Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Steps for docker to install nginx

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "the steps of installing nginx in docker". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the steps of installing nginx in docker.

Why use docker

Now the scenarios of micro-services are becoming more and more.

Strong isolation and good portability

Very suitable for continuous integration of CICD

Small example-install nginx lists all containers # docker ps enter a container if you exit from this stdin, it will not cause the container to stop. This is why it is recommended that you use docker exec (docker attach exit will cause the container to terminate) # docker exec-it 675427t bashDocker deploy Nginx and modify configuration file 1. Pull nginx image: docker pull nginx2. The host creates a mount directory: mkdir-p / data/nginx/ {conf,www,logs,logs} 3. Run docker image: docker run-d-p 8082 name wq-nginx 80-- name wq-nginx-v / data/nginx/www:/usr/share/nginx/html-v / data/nginx/conf/nginx.conf:/etc/nginx/nginx.conf-v / data/nginx/logs:/var/log/nginx nginx4. Enter the image: docker ps docker exec-it 11b090c59d1e bash so far, I believe you have a deeper understanding of the "steps for installing nginx in docker". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report