mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-26 08:25:04 +03:00
build: allow baking multiple pills into docker images
By baking (potentially) multiple pills into an image, we can provide mainnet vs ropsten images. It is still up to the operator to pass along the pill path(s) to the entrypoint. For example, using Docker: docker run --tty urbit -B /share/brass.pill -J /share/ivory.pill ... The main .image attribute still uses only the solid pill, and image-ropsten has been provided with brass and ivory pills. Additionally herb has been added to the image for convenience.
This commit is contained in:
parent
38eefb30cb
commit
122e01b13d
@ -74,8 +74,13 @@ rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
image = import ./image {
|
image = import ./image {
|
||||||
inherit pkgs urbit;
|
inherit pkgs herb urbit solid;
|
||||||
pill = bootsolid;
|
};
|
||||||
|
|
||||||
|
image-ropsten = import ./image {
|
||||||
|
inherit pkgs herb urbit;
|
||||||
|
brass = brass-ropsten;
|
||||||
|
ivory = ivory-ropsten;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,17 @@
|
|||||||
{ pkgs, urbit, pill }:
|
{ pkgs
|
||||||
|
, herb
|
||||||
|
, urbit
|
||||||
|
, solid ? null
|
||||||
|
, brass ? null
|
||||||
|
, ivory ? null
|
||||||
|
}:
|
||||||
|
|
||||||
pkgs.dockerTools.buildImage {
|
let
|
||||||
|
link = pill: path:
|
||||||
|
if pill == null then ""
|
||||||
|
else "${pkgs.coreutils}/bin/ln -sf ${pill} ${path}";
|
||||||
|
|
||||||
|
in pkgs.dockerTools.buildImage {
|
||||||
name = urbit.meta.name;
|
name = urbit.meta.name;
|
||||||
|
|
||||||
runAsRoot = ''
|
runAsRoot = ''
|
||||||
@ -12,10 +23,12 @@ pkgs.dockerTools.buildImage {
|
|||||||
|
|
||||||
mkdir -p /share /data /tmp
|
mkdir -p /share /data /tmp
|
||||||
|
|
||||||
${pkgs.coreutils}/bin/ln -sf ${pill} /share/urbit.pill
|
${link solid "/share/solid.pill"}
|
||||||
|
${link brass "/share/brass.pill"}
|
||||||
|
${link ivory "/share/ivory.pill"}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
contents = [ urbit ];
|
contents = [ urbit herb ];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
Entrypoint = [ urbit.meta.name ];
|
Entrypoint = [ urbit.meta.name ];
|
||||||
|
Loading…
Reference in New Issue
Block a user