switch to buildLayeredImage

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
ahuston-0 2024-07-03 23:47:53 -04:00
parent 824ef700b2
commit 8360e05aa0
No known key found for this signature in database
GPG Key ID: 1FACF4075E3212F7

View File

@ -3,11 +3,19 @@ let
nextcloud-apache = pkgs.dockerTools.pullImage (import ./nextcloud-apache.nix);
in
pkgs.dockerTools.buildImage {
pkgs.dockerTools.buildLayeredImage {
name = "nextcloud-custom";
tag = "latest";
fromImage = nextcloud-apache;
runAsRoot = ''
# diskSize=4096;
# buildVMMemorySize=2048;
compressor = "zstd";
contents = ./.;
enableFakechroot = true;
fakeRootCommands = ''
#!${pkgs.runtimeShell}
set -ex; \
\
apt-get update; \
@ -61,7 +69,6 @@ pkgs.dockerTools.buildImage {
/var/run/supervisord \
;
'';
copyToRoot = ./supervisord.conf;
config = {
ENV = {
NEXTCLOUD_UPDATE = 1;
@ -69,7 +76,7 @@ pkgs.dockerTools.buildImage {
CMD = [
"/usr/bin/supervisord"
"-c"
"/supervisord.conf"
./supervisord.conf
];
};