[root@localhost ~]# docker pull nginx Using default tag: latest latest: Pulling from library/nginx a2abf6c4d29d: Pull complete a9edb18cadd1: Pull complete 589b7251471a: Pull complete 186b1aaa4aa6: Pull complete b4df32aa5a72: Pull complete a0bcbecc962e: Pull complete Digest: sha256:0d17b565c37bcbd895e9d92315a05c1c3c9a29f762b011a10c54a66cd53c9b31 Status: Downloaded newer image for nginx:latest docker.io/library/nginx:latest [root@localhost ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE nginx latest 605c77e624dd 17 months ago 141MB mysql latest 3218b38490ce 18 months ago 516MB hello-world latest feb5d9fea6a5 21 months ago 13.3kB centos latest 5d0da3dc9764 21 months ago 231MB [root@localhost ~]# docker run -d --name nginx01 -p 3344:80 nginx 88ed367e89cf5cf45dd2d025ebab0efcb90f455d6bc78d9bc0fd93b28ce56432 [root@localhost ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 88ed367e89cf nginx "/docker-entrypoint.…" 10 seconds ago Up 8 seconds 0.0.0.0:3344->80/tcp, :::3344->80/tcp nginx01 [root@localhost ~]# curl localhost:3344 <!DOCTYPE html> <html> <head> <title>Welcome to nginx!</title> <style> html { color-scheme: light dark; } body { width: 35em; margin: 0 auto; font-family: Tahoma, Verdana, Arial, sans-serif; } </style> </head> <body> <h1>Welcome to nginx!</h1> <p>If you see this page, the nginx web server is successfully installed and working. Further configuration is required.</p>
<p>For online documentation and support please refer to <a href="http://nginx.org/">nginx.org</a>.<br/> Commercial support is available at <a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p> </body> </html>
|