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

posted @ 2022-02-23 08:40  ukyo--夜王  阅读(37)  评论(1编辑  收藏  举报