Host a static website using the Docker container , Build a image using the Dockerfile Docker - 2

Published: 25 April 2023
on channel: Devops TerraByte
595
4

In this viedo we will host a static website using the docker

First we will create a Dockerfile and build a image and then from the image will create a container.
Then add the container port in the nginx configuration file to run the website .

Nginx configration file for the 80 port :-

server {
listen 80;
server_name static.shivm04.xyz; # Edit this to your domain name
client_max_body_size 100M;

location / {
proxy_pass http://localhost:8081;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header Connection "Keep-Alive";
proxy_set_header Proxy-Connection "Keep-Alive";
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_read_timeout 1800;
proxy_connect_timeout 1800;
proxy_send_timeout 1800;
send_timeout 1800;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
}

}


#ubuntu
#docker
#container
#staticwebsite


Watch video Host a static website using the Docker container , Build a image using the Dockerfile Docker - 2 online without registration, duration hours minute second in high quality. This video was added by user Devops TerraByte 25 April 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 595 once and liked it 4 people.