1. [root@localhost ~]# docker pull nginx
    2. Using default tag: latest
    3. latest: Pulling from library/nginx
    4. b4d181a07f80: Pull complete
    5. 66b1c490df3f: Pull complete
    6. d0f91ae9b44c: Pull complete
    7. baf987068537: Pull complete
    8. 6bbc76cbebeb: Pull complete
    9. 32b766478bc2: Pull complete
    10. Digest: sha256:353c20f74d9b6aee359f30e8e4f69c3d7eaea2f610681c4a95849a2fd7c497f9
    11. Status: Downloaded newer image for nginx:latest
    12. docker.io/library/nginx:latest
    13. [root@localhost ~]# docker images
    14. REPOSITORY TAG IMAGE ID CREATED SIZE
    15. nginx latest 4cdc5dd7eaad 11 days ago 133MB
    16. hello-world latest d1165f221234 4 months ago 13.3kB
    17. [root@localhost ~]# docker run -d --name nginx01 -p 3344:80 nginx
    18. WARNING: IPv4 forwarding is disabled. Networking will not work.
    19. 75ba83b9b99362d5cf43978ec74725498af0b9260dea4cf7c602a69364feb5e4
    20. # -d 后台运行
    21. # --name 给容器命名
    22. # -p 宿主机端口,容器内部端口
    23. # docker端口暴露就相当于nginx端口映射 把容器内部端口映射到宿主机其他的端口上