diff --git a/Dockerfile b/Dockerfile index cfe29a65fbf6..5c380dbb62c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -149,3 +149,7 @@ EOT FROM scratch AS release COPY --from=build /project/public / COPY --from=pagefind /pagefind /pagefind + +# nginx is an image containing release compiled assets for static serving +FROM nginx AS nginx +COPY --from=release / /usr/share/nginx/html \ No newline at end of file diff --git a/docker-bake.hcl b/docker-bake.hcl index dbbf1d568ccf..d0aaf5a3deec 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -35,6 +35,16 @@ target "release" { provenance = false } +target "nginx" { + args = { + HUGO_ENV = "production" + DOCS_URL = "/" + } + target = "nginx" + provenance = false + tags = ["docker/docs:latest"] +} + group "validate" { targets = ["lint", "test", "unused-media", "test-go-redirects", "dockerfile-lint", "path-warnings"] }