19 lines
544 B
Docker
Raw Permalink Normal View History

2024-12-12 12:35:13 +00:00
# Use the official Nginx image from Docker Hub
FROM nginx:alpine
# Set the working directory in the container
WORKDIR /usr/share/nginx/html
# Remove the default Nginx welcome page
RUN rm -rf /usr/share/nginx/html/*
# Copy your static website files (e.g., HTML, CSS, JS) into the container
# Assuming the website files are in the `./website` directory on your host machine
COPY ./ /usr/share/nginx/html
# Expose port 80 for the web server
EXPOSE 80
# Start Nginx in the foreground when the container runs
CMD ["nginx", "-g", "daemon off;"]