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
|
|
|
|
|
|
|
|
export PATH=/bin:/usr/bin:/sbin:/usr/sbin:$PATH
|
|
|
|
|
|
|
|
${pkgs.dockerTools.shadowSetup}
|
|
|
|
|
2019-10-21 11:03:41 +03:00
|
|
|
mkdir -p /bin /share /data /tmp
|
|
|
|
|
|
|
|
${pkgs.coreutils}/bin/ln -sf ${pill} /share/urbit.pill
|
|
|
|
${pkgs.coreutils}/bin/ln -sf ${entrypoint} /bin/urbit
|
2019-10-03 21:19:07 +03:00
|
|
|
'';
|
|
|
|
|
|
|
|
config = {
|
2019-10-21 11:03:41 +03:00
|
|
|
Entrypoint = [ "urbit" ];
|
2019-10-03 21:19:07 +03:00
|
|
|
|
|
|
|
WorkingDir = "/data";
|
|
|
|
|
2019-10-21 11:03:41 +03:00
|
|
|
Env = [ "PATH=/bin" ];
|
|
|
|
|
2019-10-03 21:19:07 +03:00
|
|
|
Volumes = {
|
|
|
|
"/data" = {};
|
|
|
|
};
|
|
|
|
|
|
|
|
ExposedPorts = {
|
|
|
|
"80/tcp" = {};
|
|
|
|
"443/tcp" = {};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|