参考文档:https://www.cnblogs.com/kevingrace/p/9599988.html
操作记录:
C:\Users\Administrator>docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
consul latest 76802375bc5c 5 days ago 118MB
hyperf/hyperf 7.4-alpine-v3.11-swoole a308a5ddd25a 2 weeks ago 123MB
C:\Users\Administrator>docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
85c6ca0fa280 hyperf/hyperf:7.4-alpine-v3.11-swoole "sh" 3 hours ago Up 3 hours 0.0.0.0:9503->9503/tcp hyperf_rpc_service_user
874c579e35f1 hyperf/hyperf:7.4-alpine-v3.11-swoole "sh" 3 hours ago Up 3 minutes 0.0.0.0:9501->9501/tcp hyperf_rpc_client
4fe0e7f44ce2 consul "docker-entrypoint.s…" 4 hours ago Up 4 hours 0.0.0.0:8300-8302->8300-8302/tcp, 8301-8302/udp, 0.0.0.0:8500->8500/tcp, 0.0.0.0:8600->8600/tcp, 8600/udp consul1
C:\Users\Administrator>docker commit -a "huangcuigang" -m "hyperf搭建微服务demo-服务消费者" 874c579e35f1 huangcuigang/hyperf-rpc-client:v1
sha256:0eb0f4880369ed48f0fd38a385febce61f8042060cb500694e97ecf82a781fcb
C:\Users\Administrator>docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
huangcuigang/hyperf-rpc-client v1 0eb0f4880369 7 seconds ago 123MB
consul latest 76802375bc5c 5 days ago 118MB
hyperf/hyperf 7.4-alpine-v3.11-swoole a308a5ddd25a 2 weeks ago 123MB
C:\Users\Administrator>docker login
Authenticating with existing credentials...
Login Succeeded
Logging in with your password grants your terminal complete access to your account.
For better security, log in with a limited-privilege personal access token. Learn more at https://docs.docker.com/go/access-tokens/
C:\Users\Administrator>docker push huangcuigang/hyperf-rpc-client:v1
The push refers to repository [docker.io/huangcuigang/hyperf-rpc-client]
4bd0661f4efb: Pushed 3a0ffedb608e: Pushed 8226d9a8f131: Pushed 83c29a0f6ffe: Pushed 69715584ec78: Pushed v1: digest: sha256:fb295021e38c9df14bbb16af0d69203be0c1c33621c05b1836a636adfc382e26 size: 1366
C:\Users\Administrator>