Answers for "docker add volumes to running container"

0

docker create volume

$ docker volume create hello

hello

$ docker run -d -v hello:/world busybox ls /world
Posted by: Guest on October-05-2020
0

docker add volumes to running container

$ 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
Posted by: Guest on March-21-2021
0

docker create volume

docker volume create [OPTIONS] [VOLUME]
Posted by: Guest on October-05-2020

Code answers related to "docker add volumes to running container"

Browse Popular Code Answers by Language