Initial commit
This commit is contained in:
commit
8bfb2256f8
7 changed files with 239 additions and 0 deletions
30
image.nix
Normal file
30
image.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ pkgs ? import <nixpkgs> {}, withPackages, ocUrl, ocSha256 }:
|
||||
|
||||
let
|
||||
|
||||
opencode = builtins.fetchTarball {
|
||||
url = ocUrl;
|
||||
sha256 = ocSha256;
|
||||
};
|
||||
in
|
||||
pkgs.dockerTools.streamLayeredImage {
|
||||
name = "ocd";
|
||||
tag = "latest";
|
||||
|
||||
contents = [
|
||||
pkgs.glibc
|
||||
opencode
|
||||
] ++ (withPackages pkgs);
|
||||
|
||||
fromImage = pkgs.dockerTools.pullImage {
|
||||
imageName = "alpine";
|
||||
imageDigest = "sha256:85f2b723e106c34644cd5851d7e81ee87da98ac54672b29947c052a45d31dc2f";
|
||||
sha256 = "sha256-7ZZq7Hzgpcf7gvUrfC84SW4FrN2FwwF5+kYgWKYJQuQ=";
|
||||
};
|
||||
|
||||
config = {
|
||||
Cmd = [ "/bin/sh" ];
|
||||
WorkingDir = "/workspace";
|
||||
Volumes = { "/workspace" = {}; "/root/.local/share/opencode" = {}; };
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue