sudo docker volume ls
docker volume create <VOLUME NAME>
sudo docker volume inspect <VOLUME NAME>
docker run -it -v <VOLUME NAME>:/shared-volume --name my-container-01 ubuntu
docker run -v /host/directory:/container/directory -other -options image_name command_to_run
# create volume named ubuntu_data
volume create ubuntu_data
# inspect the volume created
docker volume inspect ubuntu_data
# attach the ubutu_data volume to a folder named volume_data
# in ubuntu then run ubuntu container by image name
docker run -it -v ubuntu_data:/volume_data ubuntu
# stop all docker running activities
docker system prune
# list all volumes for docker
docker volume ls
# delete the volume named ubuntu_data is no longer used
docker volume -rm ubuntu_data
docker run -it --rm -p 10001:8888 -v "{current directory(pwd)}":/home/jovyan/work jupyter/datascience-notebook:6b49f3337709
$ docker service create -d
--replicas=4
--name devtest-service
--mount source=myvol2,target=/app
nginx:latest