一次性操作完退出容器
以
python:3.9-slim
镜像为例
docker run -it python:3.9-slim bash
以
python:3.9-alpine
镜像为例
docker run -it python:3.9-alpine sh
永久保留容器不退出
以
python:3.9-slim
镜像为例
docker run -d --name test 61205c899b74 tail -f /dev/null
docker exec -it test bash
以
python:3.9-alpine
镜像为例
docker run -d --name test 61205c899b74 tail -f /dev/null
docker exec -it test sh
评论区