commit 061c7bb2b7c994b11f0620817b153a921b7391dd parent 5759a20c98c04d57d67707dbc2e6ca3e4a1d7153 Author: Nikolay Korotkiy <sikmir@gmail.com> Date: Tue, 26 Jan 2021 12:57:23 +0300 Add docker-elevation_server Diffstat:
M | pkgs/default.nix | | | 1 | + |
A | pkgs/images/elevation_server/default.nix | | | 19 | +++++++++++++++++++ |
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -222,6 +222,7 @@ lib.makeScope newScope ( ### IMAGES + docker-elevation_server = callPackage ./images/elevation_server { }; docker-git = callPackage ./images/git { git = pkgs.gitMinimal.override { perlSupport = false; diff --git a/pkgs/images/elevation_server/default.nix b/pkgs/images/elevation_server/default.nix @@ -0,0 +1,19 @@ +{ dockerTools, elevation_server }: + +dockerTools.buildImage { + name = "elevation_server"; + tag = elevation_server.version; + + contents = [ elevation_server ]; + runAsRoot = "mkdir -p /dem"; + + config = { + Cmd = [ "${elevation_server}/bin/elevation_server" "-dem" "/dem/dem_tiles" "-host" "0.0.0.0" ]; + Volumes = { + "/dem" = { }; + }; + ExposedPorts = { + "8080/tcp" = { }; + }; + }; +}