docker使用
[root@localhost ~]# curl -I tabao.com
HTTP/1.1 404 Not Found
Server: nginx
Date: Fri, 24 Oct 2025 06:26:05 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 18
Connection: keep-alive
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
Digest: sha256:029d4461bd98f124e531380505ceea2072418fdf28752aa73b7b273ba3048903
Status: Image is up to date for nginx:latest
docker.io/library/nginx:latest
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# docker run -d -p 80:80 nginx:latest
9fb6cd2031cd9c3482acb84b95060ea985faeb159cf5c73b7eed6d0d42e3f33c
[root@localhost ~]#
[root@localhost ~]#



[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9fb6cd2031cd nginx:latest "/docker-entrypoint.…" 2 minutes ago Up 2 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp affectionate_wescoff
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# docker logs -f 9fb6cd2031cd
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2025/10/24 06:27:13 [notice] 1#1: using the "epoll" event method
2025/10/24 06:27:13 [notice] 1#1: nginx/1.29.2
2025/10/24 06:27:13 [notice] 1#1: built by gcc 14.2.0 (Debian 14.2.0-19)
2025/10/24 06:27:13 [notice] 1#1: OS: Linux 3.10.0-957.el7.x86_64
2025/10/24 06:27:13 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 65536:65536
2025/10/24 06:27:13 [notice] 1#1: start worker processes
2025/10/24 06:27:13 [notice] 1#1: start worker process 29
2025/10/24 06:27:13 [notice] 1#1: start worker process 30


[root@localhost ~]# docker run -it --name www.yuchaoit.cn_centos7 centos:7.9.2009 bash
Unable to find image 'centos:7.9.2009' locally
7.9.2009: Pulling from library/centos
2d473b07cdd5: Pull complete
Digest: sha256:be65f488b7764ad3638f236b7b515b3678369a5124c47b8d32916d6487418ea4
Status: Downloaded newer image for centos:7.9.2009
[root@b9fe47ae781b /]#
浙公网安备 33010602011771号