19 lines
529 B
Docker
19 lines
529 B
Docker
|
|
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
|
||
|
|
|
||
|
|
EXPOSE 80
|
||
|
|
CMD ["nginx", "-g", "daemon off;"]
|