In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this article "how to deploy nginx in Docker", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to deploy nginx in Docker" article.
Environment
Centos7
Install docker to remove the old version docker [root@chaols ~] # sudo yum remove docker\ > docker-client\ > docker-client-latest\ > docker-common\ > docker-latest\ > docker-latest-logrotate\ > docker-logrotate\ > Docker-engine install yum-utils package and set up stable repository [root@chaols ~] # yum install-y yum-utils install docker [root @ chaols ~] # yum install docker-ce docker-ce-cli containerd.io launch docker [root @ chaols ~] # systemctl start docker to view docker image
There is no mirror image when docker is just installed.
[root@chaols ~] # docker imagesREPOSITORY TAG IMAGE ID CREATED SIZE deployment nginx download nginx image [root@chaols ~] # docker pull nginxUsing default tag: latestlatest: Pulling from library/nginxe1acddbe380c: Pull completee21006f71c6f: Pull completef3341cc17e58: Pull complete2a53fa598ee2: Pull complete12455f71a9b5: Pull completeb86f2ba62d17: Pull completeDigest: sha256:4d4d96ac750af48c6a551d757c1cbfc071692309b491b70b2b8976e102dd3fefStatus: Downloaded newer image for nginx:latestdocker.io/library/nginx:latest create nginx virtual machine
Run run-it interaction mode-name specified name-p host: docker virtual machine nginx image name / bin/bash starts bash after booting the container
[root@chaols] # docker run-it-- name chao.nginx-p 8080 nginx/ bin/bashroot@8ebe4de10f2c:/# / etc/init.d/nginx start2021/08/21 07:58:49 [notice] 11: 11: using the "epoll" event method2021/08/21 07:58:49 [notice] 11: nginx/1.21.12021/08/21 07:58:49 [notice] 11: 11: built by gcc 8.3.0 (Debian 8.3.0- 6) 07:58:49 on 2021-08-21 [notice] 11: OS: Linux 3.10.0-1160.el7.x86_642021/08/21 07:58:49 [notice] 11: getrlimit (RLIMIT_NOFILE): 1048576:1048576root@8ebe4de10f2c:/# 2021-08-21 07:58:49 [notice] 12: start worker processes2021/08/21 07:58:49 [notice] 12: start worker process 13 verification
The above is about the content of this article on "how to deploy nginx in Docker". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.