docker容器相关
查看镜像
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
springbucks/waiter-service 0.0.1-SNAPSHOT e1988342d3af 8 hours ago 683MB
java 8 d23bdf5b1b1b 5 years ago 643MB
启动
docker run --name waiter-service -d -p 8080:8080 springbucks/waiter-service:0.0.1-SNAPSHOT
查看进程
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7a64ab91b3ba springbucks/waiter-service:0.0.1-SNAPSHOT "java -jar /waiter-s…" About a minute ago Up About a minute 0.0.0.0:8080->8080/tcp waiter-service
查看日志
docker logs waiter-service
删除容器(容器id ps命令获取)
docker rm f555b4cfa55fc45198dd4a46632697431b53f1493a4e3033691a0a84e
f555b4cfa55fc45198dd4a46632697431b53f1493a4e3033691a0a84e
停止容器
docker stop f555b4cfa55fc45198dd4a46632697431b53f1493a4e3033691a0a84e
docker logs waiter-service
本文来自博客园,作者:ukyo--夜王,转载请注明原文链接:https://www.cnblogs.com/ukzq/p/15925783.html