云平台图片代理服务Docker操作命令:
1.下载Docker镜像
[root@linux-node1 ~]# docker pull hotxia/tgc-nginx-images
Using default tag: latest
latest: Pulling from hotxia/tgc-nginx-images
Digest: sha256:0befdbad28c2113e89bc991c43262be076e93480ee0af1e5390ed0e2fce493b4
Status: Image is up to date for hotxia/tgc-nginx-images:latest
docker.io/hotxia/tgc-nginx-images:latest
2.启动Docker容器
[root@linux-node1 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hotxia/tgc-nginx-images latest 1480063f07fa 3 hours ago 2.97GB
tgc-nginx-images latest 1480063f07fa 3 hours ago 2.97GB
dadoha/centos7.4.1708 latest 196e0ce0c9fb 2 years ago 197MB
[root@linux-node1 ~]# docker run -itd -p 192.168.56.11:80:80 hotxia/tgc-nginx-images /bin/bash
3e0ca74ee3cfa9cd8d377c080206ee75dd0a35f8719012aa2741d1764ee54866
3.进入Docker容器查看服务运行是否正常
[root@linux-node1 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3e0ca74ee3cf hotxia/tgc-nginx-images "/bin/bash" 33 seconds ago Up 29 seconds 192.168.56.11:80->80/tcp condescending_gould
6574c715eb61 196e0ce0c9fb "/bin/bash" 4 hours ago Up 4 hours lucid_hellman
[root@linux-node1 ~]# docker exec -it 3e0ca74ee3cf /bin/bash
[root@3e0ca74ee3cf /]# netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
[root@3e0ca74ee3cf /]# nginx
[root@3e0ca74ee3cf /]# netstat -tlnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 37/nginx: master p
Content type
Image
Digest
Size
1.6 GB
Last updated
almost 7 years ago
docker pull hotxia/tgc-nginx-images