Files
docker-docs/Dockerfile.nginx.onbuild
Kir Kolyshkin 67ca5f2c80 Dockerfile.build: fix apk invocation
Use --no-cache flag to
 - avoid doing cache update;
 - leaving metadata in the resulting image).

Per https://github.com/gliderlabs/docker-alpine/blob/master/docs/usage.md#disabling-cache

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-03-13 10:39:03 -07:00

20 lines
845 B
Docker

# Base image to use for building documentation archives
# this image uses "ONBUILD" to perform all required steps in the archives
# and relies upon its parent image having a layer called `builder`.
FROM nginx:alpine
# Make the version accessible to this build-stage, and copy it to an ENV so that it persists in the final image
ONBUILD ARG VER
ONBUILD ENV VER=$VER
# Clean out any existing HTML files, and copy the HTML from the builder stage to the default location for Nginx
ONBUILD RUN rm -rf /usr/share/nginx/html/*
ONBUILD COPY --from=builder /site /usr/share/nginx/html
# Copy the Nginx config
COPY nginx-overrides.conf /etc/nginx/conf.d/default.conf
# Start Nginx to serve the archive at / (which will redirect to the version-specific dir)
CMD echo -e "Docker docs are viewable at:\nhttp://0.0.0.0:4000"; exec nginx -g 'daemon off;'