2023-09-10 07:14:03 +00:00
|
|
|
# Use the official Nginx base image
|
|
|
|
FROM nginx:latest
|
2023-09-03 12:12:43 +00:00
|
|
|
|
2023-09-10 07:14:03 +00:00
|
|
|
# Create a directory to store your custom Nginx configuration
|
|
|
|
RUN mkdir -p /etc/nginx/custom
|
|
|
|
|
|
|
|
# Install MySQL client library (if needed)
|
|
|
|
# RUN apt-get update && apt-get install -y default-mysql-client
|
|
|
|
|
|
|
|
# Copy your custom HTML and logo files to the Nginx web root
|
2023-09-03 12:12:43 +00:00
|
|
|
COPY index.html /usr/share/nginx/html/
|
|
|
|
COPY logo.png /usr/share/nginx/html/
|
|
|
|
|
2023-09-10 07:14:03 +00:00
|
|
|
# Copy Nginx configuration file
|
|
|
|
COPY nginx.conf /etc/nginx/custom/nginx.conf
|
|
|
|
|
|
|
|
# Copy a custom script that will start Nginx and keep it running
|
|
|
|
COPY start-nginx.sh /usr/local/bin/start-nginx.sh
|
|
|
|
|
|
|
|
# Make the script executable
|
|
|
|
RUN chmod +x /usr/local/bin/start-nginx.sh
|
|
|
|
|
|
|
|
# Expose port 80 for incoming HTTP traffic
|
|
|
|
EXPOSE 80
|
|
|
|
|
|
|
|
# Define the command to start Nginx using your custom script
|
|
|
|
CMD ["/usr/local/bin/start-nginx.sh"]
|