2808 explained code solutions for 75 technologies


dockerHow to add volume to docker container


docker volume create data
docker run -it --mount source=data,destination=/data ubuntuctrl + c
docker volume

volume manipulations

create

create new volume

data

name of the volume to be created

docker run

launch container from specified image

-it

connect to container command line when launched

--mount

mount specified volume

source=data

name of the volume to mount

destination=/data

path which volume will be accessed from the container

ubuntu

image name to launch