{ pkgs ? import {} }: let utils = import ../../../deployment/utils.nix ; nginx_conf = pkgs.writeTextFile { name = "nginx.conf"; text= '' user root; daemon off; error_log /dev/stdout info; pid /dev/null; events {} http { access_log /dev/stdout; server { listen 80; index index.html; root ${../frontend}; } } ''; }; in pkgs.dockerTools.buildImage { name = "frontend-gotta-catch-them-all"; tag = "latest"; contents = [ pkgs.nginx ] ; runAsRoot = '' ${pkgs.dockerTools.shadowSetup} mkdir -p var/log/nginx mkdir -p var/cache/nginx ''; config = { ExposedPorts = { "80/tcp" = {}; }; Cmd = [ "${pkgs.nginx}/bin/nginx" "-c" "${nginx_conf}" ]; } ; }