From f7f5c5aa8d7a5ab5194281d622d8e3f936e5b75c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 8 Jan 2021 13:06:05 +0100 Subject: [PATCH] don't create cache/log volume --- image.nix | 5 +++-- module.nix | 4 ---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/image.nix b/image.nix index a198b13..a0d9d71 100644 --- a/image.nix +++ b/image.nix @@ -3,9 +3,10 @@ dockerTools.buildLayeredImage { name = "nginx"; contents = [ nginx ]; + # also we log to stderr, it still needs /var/log/nginx on start extraCommands = '' - mkdir -p etc - chmod u+w etc + mkdir -p etc var/cache/nginx var/log/nginx + chmod u+w etc var/cache/nginx var/log/nginx echo "nginx:x:1000:1000::/:" > etc/passwd echo "nginx:x:1000:nginx" > etc/group ''; diff --git a/module.nix b/module.nix index 3593e65..f77956f 100644 --- a/module.nix +++ b/module.nix @@ -22,13 +22,9 @@ in { imagePullPolicy = "IfNotPresent"; volumeMounts."/etc/nginx".name = "config"; volumeMounts."/var/lib/html".name = "static"; - volumeMounts."/var/log/nginx".name = "logs"; - volumeMounts."/var/log/cache".name = "cache"; }; volumes.config.configMap.name = "nginx-config"; volumes.static.configMap.name = "nginx-static"; - volumes.logs.configMap.name = "nginx-logs"; - volumes.cache.configMap.name = "nginx-cache"; }; }; };