2019-10-14 10:17:40 +03:00
|
|
|
{ pkgs, urbit, pill }:
|
2019-10-03 21:19:07 +03:00
|
|
|
|
|
|
|
pkgs.dockerTools.buildImage {
|
2019-10-21 11:03:41 +03:00
|
|
|
name = urbit.meta.name;
|
2019-10-03 21:19:07 +03:00
|
|
|
|
|
|
|
runAsRoot = ''
|
|
|
|
#!${pkgs.stdenv.shell}
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
${pkgs.dockerTools.shadowSetup}
|
|
|
|
|
2019-12-16 11:18:08 +03:00
|
|
|
mkdir -p /share /data /tmp
|
2019-10-21 11:03:41 +03:00
|
|
|
|
|
|
|
${pkgs.coreutils}/bin/ln -sf ${pill} /share/urbit.pill
|
2019-10-03 21:19:07 +03:00
|
|
|
'';
|
|
|
|
|
2019-12-16 11:18:08 +03:00
|
|
|
contents = [ urbit ];
|
|
|
|
|
2019-10-03 21:19:07 +03:00
|
|
|
config = {
|
2019-12-16 11:18:08 +03:00
|
|
|
Entrypoint = [ urbit.meta.name ];
|
2019-10-03 21:19:07 +03:00
|
|
|
|
|
|
|
WorkingDir = "/data";
|
|
|
|
|
|
|
|
Volumes = {
|
|
|
|
"/data" = {};
|
|
|
|
};
|
|
|
|
|
|
|
|
ExposedPorts = {
|
|
|
|
"80/tcp" = {};
|
|
|
|
"443/tcp" = {};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|