diff options
Diffstat (limited to 'cluster/prod/app/cryptpad/build/docker.nix')
-rw-r--r-- | cluster/prod/app/cryptpad/build/docker.nix | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/cluster/prod/app/cryptpad/build/docker.nix b/cluster/prod/app/cryptpad/build/docker.nix index 168963d..16bb134 100644 --- a/cluster/prod/app/cryptpad/build/docker.nix +++ b/cluster/prod/app/cryptpad/build/docker.nix @@ -1,11 +1,27 @@ -let - common = import ./common.nix; - pkgs = import common.pkgsSrc {}; - app = import ./default.nix; -in - pkgs.dockerTools.buildLayeredImage { - name = "superboum/cryptpad"; - config = { - Cmd = [ "${app}/bin/cryptpad" ]; +{ pkgs ? import <nixpkgs> {} + +, name ? "cryptpad" +, tag ? "nix-latest" + +, withOnlyOffice ? true + +, cryptpad ? pkgs.callPackage ./default.nix { inherit withOnlyOffice; } +}: let + cryptpad' = cryptpad.overrideAttrs { + postInstall = '' + ln -sf /cryptpad/customize $out/customize + ''; + }; +in pkgs.dockerTools.buildImage { + inherit name tag; + + config = { + Cmd = [ + (pkgs.lib.getExe cryptpad') + ]; + + Volumes = { + "/cryptpad/customize" = {}; }; - } + }; +} |