Ask Your Question
3

Can external folders be linked to internal Docker folders when the container initializes automatically during bootup?

asked 2023-06-30 16:55:08 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-06-30 16:59:02 +0000

lakamha gravatar image

Yes, external folders can be linked to internal Docker folders when the container initializes automatically during bootup using the Docker volume option.

For example, to mount the external folder /home/user/data to the internal folder /app/data on container startup, you can use the following command:

docker run -v /home/user/data:/app/data image_name

This will create a Docker volume that links the external folder to the internal folder and configure the container to use it during startup.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-30 16:55:08 +0000

Seen: 15 times

Last updated: Jun 30 '23