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

preview_player
Показать описание
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;
client_max_body_size 100M;

location / {
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
Рекомендации по теме
Комментарии
Автор

Hello sir!

Thanks much for this wonderful lesson. The steps are coherent.

Please sir can you present this same lesson in English language? This is because I don’t understand the language you are using so well

Thanks in advance sir.
Your student from Cameroon 🇨🇲

SamuelTitinho
welcome to shbcf.ru