Welcome to mirror list, hosted at ThFree Co, Russian Federation.

nginx.onbuild.Dockerfile « dockerfiles - gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d785efff5692035fbdb59e023806a82cb95cdc8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 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 dockerfiles/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 ["sh", "-c", "echo 'GitLab docs are viewable at: http://0.0.0.0:4000'; exec nginx -g 'daemon off;'"]