1.1 搜索镜像

  1. ╰─ docker search nginx
  2. NAME DESCRIPTION STARS OFFICIAL AUTOMATED
  3. nginx Official build of Nginx. 15984 [OK]
  4. jwilder/nginx-proxy Automated Nginx reverse proxy for docker con 2103 [OK]
  5. richarvey/nginx-php-fpm Container running Nginx + PHP-FPM capable of 820 [OK]
  6. jc21/nginx-proxy-manager Docker container for managing Nginx proxy ho 294
  7. linuxserver/nginx An Nginx container, brought to you by LinuxS 161
  8. tiangolo/nginx-rtmp Docker image with Nginx using the nginx-rtmp 148 [OK]
  9. jlesage/nginx-proxy-manager Docker container for Nginx Proxy Manager 147 [OK]
  10. alfg/nginx-rtmp NGINX, nginx-rtmp-module and FFmpeg from sou 112 [OK]
  11. nginxdemos/hello NGINX webserver that serves a simple page co 80 [OK]
  12. privatebin/nginx-fpm-alpine PrivateBin running on an Nginx, php-fpm & Al 61 [OK]
  13. nginx/nginx-ingress NGINX and NGINX Plus Ingress Controllers fo 59
  14. nginxinc/nginx-unprivileged Unprivileged NGINX Dockerfiles 56
  15. nginxproxy/nginx-proxy Automated Nginx reverse proxy for docker con 31
  16. staticfloat/nginx-certbot Opinionated setup for automatic TLS certs lo 25 [OK]
  17. nginx/nginx-prometheus-exporter NGINX Prometheus Exporter for NGINX and NGIN 22
  18. schmunk42/nginx-redirect A very simple container to redirect HTTP tra 19 [OK]
  19. centos/nginx-112-centos7 Platform for running nginx 1.12 or building 16
  20. centos/nginx-18-centos7 Platform for running nginx 1.8 or building n 13
  21. bitwarden/nginx The Bitwarden nginx web server acting as a r 12
  22. flashspys/nginx-static Super Lightweight Nginx Image 11 [OK]
  23. mailu/nginx Mailu nginx frontend 10 [OK]
  24. webdevops/nginx Nginx container 9 [OK]
  25. sophos/nginx-vts-exporter Simple server that scrapes Nginx vts stats a 7 [OK]
  26. ansibleplaybookbundle/nginx-apb An APB to deploy NGINX 3 [OK]
  27. wodby/nginx Generic nginx 1 [OK]
  28. ╭─

1.2 拉取镜像

  1. ╰─ docker pull nginx
  2. Using default tag: latest
  3. latest: Pulling from library/nginx
  4. e5ae68f74026: Pull complete
  5. 21e0df283cd6: Pull complete
  6. ed835de16acd: Pull complete
  7. 881ff011f1c9: Pull complete
  8. 77700c52c969: Pull complete
  9. 44be98c0fab6: Pull complete
  10. Digest: sha256:9522864dd661dcadfd9958f9e0de192a1fdda2c162a35668ab6ac42b465f0603
  11. Status: Downloaded newer image for nginx:latest
  12. docker.io/library/nginx:latest

1.3 运行容器

  1. ╰─ docker run -d --name nginx01 -p 3344:80 nginx
  2. ac869705cdb203ddb7766da12835f5c257ddcb46ab691f335a59564f93561d2a

左边是物理端口,右边是容器端口

1.4 访问测试

image.png