kubenix/examples/nginx-deployment/image.nix

19 lines
371 B
Nix
Raw Normal View History

2019-03-07 18:03:51 +01:00
{ dockerTools, nginx }:
dockerTools.buildLayeredImage {
name = "nginx";
contents = [ nginx ];
extraCommands = ''
2019-10-06 21:42:19 +02:00
mkdir -p etc
2019-03-07 18:03:51 +01:00
chmod u+w etc
echo "nginx:x:1000:1000::/:" > etc/passwd
echo "nginx:x:1000:nginx" > etc/group
'';
config = {
2021-05-13 17:27:08 -04:00
Cmd = [ "nginx" "-c" "/etc/nginx/nginx.conf" ];
2019-03-07 18:03:51 +01:00
ExposedPorts = {
2021-05-13 17:27:08 -04:00
"80/tcp" = { };
2019-03-07 18:03:51 +01:00
};
};
}