1

Mounting a volume from the host into a Docker container

 2 years ago
source link: https://www.kevinhooke.com/2021/10/09/mounting-a-volume-from-the-host-into-a-docker-container/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Mounting a volume from the host into a Docker container

Assuming you have a folder called /data that you want to mount and access within a Docker container, you can so this a couple of ways, but the easiest is to specify when you start the container as a bind mount, with:

docker run –volume /host-path:/container-path:[rw|ro] imagename –volume

More info and options in the docs here.

CategoriesTech NotesTagsdocker

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Comment

Name *

Email *

Website

Save my name, email, and website in this browser for the next time I comment.

Notify me of follow-up comments by email.

Notify me of new posts by email.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Post navigation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK