使用docker运行测试nginx

[root@dingqisui ~]# docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
bf5952930446: Pull complete 
cb9a6de05e5a: Pull complete 
9513ea0afb93: Pull complete 
b49ea07d2e93: Pull complete 
a5e4a503d449: Pull complete 
Digest: sha256:b0ad43f7ee5edbc0effbc14645ae7055e21bc1973aee5150745632a24a752661
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest
[root@dingqisui ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
nginx               latest              4bb46517cac3        2 weeks ago         133MB
centos              latest              0d120b6ccaa8        3 weeks ago         215MB
[root@dingqisui ~]# docker run -d --name nginx9988 -p 3344:80 nginx
f3ecc2cb0c35adaa470e26b550ccc53c9c6f957b14f3fb16baba5f060edf6f95

这个3344是你的服务器开放的安全组 80是nginx的默认端口
在这里插入图片描述
可以访问。

猜你喜欢

转载自blog.csdn.net/qq_43612538/article/details/108356747
今日推荐