标签:name less vol command image pre dex ping mysql
╭─will in ~ 11:11:27 ╰─(??_?) docker run -tid --name redis -P redis 344ea0c6b48a9db551f530998ce901347d72ba9b03a82628979aaddd53189fe7 ╭─will in ~ 11:11:32 ╰─ヾ(;?;Д;?;)?? docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 344ea0c6b48a redis "docker-entrypoint.s…" Less than a second ago Up 2 seconds 0.0.0.0:32769->6379/tcp redis
╭─will in ~ 11:11:34 ╰─╰(*°▽°*)╯ docker run -tid --name redis-1 -p 6380:6379 redis 4b10e4b28fe7125fb40b8a338f6bb225ef3e4e5917722d63af61e300857a2220 ╭─will in ~ 11:13:27 ╰─(??_?) docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4b10e4b28fe7 redis "docker-entrypoint.s…" Less than a second ago Up 2 seconds 0.0.0.0:6380->6379/tcp redis-1
╭─will in ~ 11:00:50 ╰─ε=ε=ヾ(;?д?)/ docker run -tid --name nginx -v /Users/will:/usr/share/nginx/html -p 8088:80 nginx 4d95127b3a60393fe8e078bce8919a53c8f2566066e4968b6a7f73cc1e22176d
"Mounts": [ { "Type": "bind", "Source": "/Users/will", "Destination": "/usr/share/nginx/html", "Mode": "", "RW": true, "Propagation": "rprivate" } ], "Ports": { "80/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "8088" } ] }
╭─will in ~ 11:02:52 ╰─(?? ??_??)? touch index.html ╭─will in ~ 11:03:02 ╰─?(?﹏?、)? echo "helloworld" > index.html ╭─will in ~ 11:03:09 ╰─(*′?д?)? curl localhost:8088 helloworld
╭─will in ~ 11:19:21 ╰─(??Д?)? docker network create -d bridge my-net c90d0b1e79783e673f58f1ec2b2c472f034693eca54296adb364351091f0b9fb
╭─will in ~ 11:19:22 ╰─(o﹃o) docker run -it --rm --name busybox1 --network my-net busybox sh / # ╭─will in ~ 11:09:29 ╰─ε=ε=ヾ(;?д?)/ docker run -it --rm --name busybox2 --network my-net busybox sh / # ping busybox1 PING busybox1 (172.26.0.2): 56 data bytes 64 bytes from 172.26.0.2: seq=0 ttl=64 time=0.148 ms 64 bytes from 172.26.0.2: seq=1 ttl=64 time=0.291 ms
╭─will in ~/will/project/cluster 11:23:33 ╰─(?3?)~? docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 47215f45415c busybox "sh" About a minute ago Up About a minute busybox2 4af85ed6478c busybox "sh" 2 minutes ago Up 2 minutes busybox1
Docker 外部访问容器Pp、数据管理volume、网络network 介绍
标签:name less vol command image pre dex ping mysql
原文地址:https://www.cnblogs.com/will-xz/p/9910341.html