3 ms·
> I'd think it'd be even slimmer to generate the build artifact first, then just copy that into the container. That's what this is doing. It creates builder co
by IanCal 7y ago
> I'd think it'd be even slimmer to generate the build artifact first, then just copy that into the container.
That's what this is doing. It creates builder containers, uses them to make the artifact and copies it in:
FROM nginx:1.17.10-alpine
RUN rm -r /usr/share/nginx/html/
COPY --from=builder /app/_site/ /usr/share/nginx/html/
EXPOSE 80
The final image is nginx with the static files copied over.