14 lines
406 B
Docker
14 lines
406 B
Docker
# Use the official Nginx image from Docker Hub
|
|
FROM nginx:alpine
|
|
|
|
ARG VERSION=dev
|
|
|
|
# Copy website files into the Nginx server's root directory
|
|
COPY /website /usr/share/nginx/html
|
|
COPY default.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# Replace __VERSION__ in all .html files
|
|
RUN sh -c 'find /usr/share/nginx/html -type f -name "*.html" -exec sed -i "s/__VERSION__/${VERSION}/g" {} +'
|
|
|
|
# Expose port 80
|
|
EXPOSE 80 |