Add Dockerfile
This commit is contained in:
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# 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
|
||||||
Reference in New Issue
Block a user