2026-08-23 14:42:30 +00:00
|
|
|
FROM nginx:alpine
|
|
|
|
|
|
|
|
|
|
# Copy nginx config first (changes less often → cached layer)
|
|
|
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
|
|
|
|
|
|
# Copy site content
|
|
|
|
|
COPY . /usr/share/nginx/html/
|
|
|
|
|
|
|
|
|
|
# Remove non-web files from the image
|
|
|
|
|
RUN rm -rf /usr/share/nginx/html/.git \
|
|
|
|
|
/usr/share/nginx/html/.gitea \
|
|
|
|
|
/usr/share/nginx/html/.dockerignore \
|
|
|
|
|
/usr/share/nginx/html/Dockerfile \
|
|
|
|
|
/usr/share/nginx/html/LICENSE \
|
|
|
|
|
/usr/share/nginx/html/README.md \
|
|
|
|
|
/usr/share/nginx/html/generate-nav.sh
|
|
|
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|