李明
|
exec
docker run -d zhugeaming/flask-hello-world docker ps
image.png docker exec -it c62d9d554853 /bin/bash
ls ps -ef | grep python#app.py 就是上一节讲的python源码,现在有一个进程在运行就是app.pyexit
#直接运行起来容器里面的python程序了,可以执行python的命令docker exec -it c62d9d554853 python
#直接运行起来,查看容器的ip信息docker exec -it c62d9d554853 ip a
stop
docker container ls docker container stop c62d9d554853 docker container ls
start
docker container ls docker container start c62d9d554853 docker container ls
rm
docker container ls docker container rm c62d9d554853 docker container ls docker container stop c62d9d554853 docker container rm c62d9d554853
--name
docker run -d --name=laotie zhugeaming/flask-hello-world docker container ls
inspect
docker container ls docker inspect 00ae52f854ac
log
docker container ls docker container logs 00ae52f854ac
image.png 官网最全
PS:跟官网学绝对最稳,如果英语不行,跟我学,没毛病吧老铁,干就完了!
|
2018-09-03 10:22:07