don't create cache/log volume
This commit is contained in:
parent
5907008f2b
commit
f7f5c5aa8d
|
@ -3,9 +3,10 @@
|
||||||
dockerTools.buildLayeredImage {
|
dockerTools.buildLayeredImage {
|
||||||
name = "nginx";
|
name = "nginx";
|
||||||
contents = [ nginx ];
|
contents = [ nginx ];
|
||||||
|
# also we log to stderr, it still needs /var/log/nginx on start
|
||||||
extraCommands = ''
|
extraCommands = ''
|
||||||
mkdir -p etc
|
mkdir -p etc var/cache/nginx var/log/nginx
|
||||||
chmod u+w etc
|
chmod u+w etc var/cache/nginx var/log/nginx
|
||||||
echo "nginx:x:1000:1000::/:" > etc/passwd
|
echo "nginx:x:1000:1000::/:" > etc/passwd
|
||||||
echo "nginx:x:1000:nginx" > etc/group
|
echo "nginx:x:1000:nginx" > etc/group
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -22,13 +22,9 @@ in {
|
||||||
imagePullPolicy = "IfNotPresent";
|
imagePullPolicy = "IfNotPresent";
|
||||||
volumeMounts."/etc/nginx".name = "config";
|
volumeMounts."/etc/nginx".name = "config";
|
||||||
volumeMounts."/var/lib/html".name = "static";
|
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.config.configMap.name = "nginx-config";
|
||||||
volumes.static.configMap.name = "nginx-static";
|
volumes.static.configMap.name = "nginx-static";
|
||||||
volumes.logs.configMap.name = "nginx-logs";
|
|
||||||
volumes.cache.configMap.name = "nginx-cache";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue