{ dockerTools, nginx }: dockerTools.buildLayeredImage { name = "nginx"; contents = [ nginx ]; # also we log to stderr, it still needs /var/log/nginx on start extraCommands = '' 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 ''; config = { Cmd = ["nginx" "-c" "/etc/nginx/nginx.conf"]; ExposedPorts = { "8383/tcp" = {}; }; }; }