# 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