22 lines
		
	
	
		
			997 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			997 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
| # Use the official lightweight Nginx image from Docker Hub.
 | |
| # The 'alpine' tag means it's based on the small Alpine Linux distribution.
 | |
| FROM nginx:alpine
 | |
| 
 | |
| # Set the working directory to the default Nginx web root.
 | |
| # Any subsequent COPY commands will be relative to this directory.
 | |
| WORKDIR /usr/share/nginx/html
 | |
| 
 | |
| # Copy the website files from your local machine (the build context)
 | |
| # into the working directory inside the container.
 | |
| # This assumes your index.html, profile.jpg, and favicon.png
 | |
| # are in the same directory as this Dockerfile.
 | |
| COPY index.html profile.jpg favicon.png ./
 | |
| 
 | |
| # Expose port 80 on the container. This is the default port for HTTP traffic
 | |
| # that Nginx listens on. You will map this to a host port when you run the container.
 | |
| EXPOSE 80
 | |
| 
 | |
| # The default command for the nginx image is to start the server.
 | |
| # However, it's good practice to specify it for clarity.
 | |
| # This command starts nginx in the foreground, which is standard for containers.
 | |
| CMD ["nginx", "-g", "daemon off;"] |