📌  相关文章
📜  docker 将卷添加到正在运行的容器 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:38.992000             🧑  作者: Mango

代码示例2
$ docker ps  -a
CONTAINER ID        IMAGE                 COMMAND                  CREATED              STATUS                          PORTS               NAMES
    5a8f89adeead        ubuntu:14.04          "/bin/bash"              About a minute ago   Exited (0) About a minute ago                       agitated_newton

$ docker commit 5a8f89adeead newimagename

$ docker run -ti -v "$PWD/somedir":/somedir newimagename /bin/bash