Mount a local volume in a container using Dockerfile?

0

I'm trying to make a local directory link inside the container, explain why.

The idea is to have a container with the S.O running but the web project is housed in a local folder. I know that using the command:

-v /path/on/host:/path/in/container 

in Docker run is possible. But my intention and I think the most optimal would be to mount the local directory within Dockerfile , when the "build" is done, so that the rest of the team does not have errors.

Thank you.

    
asked by Marc Torres 14.11.2016 в 12:16
source

1 answer

1

The "-v" parameter is to be mounted from the terminal, to use volumes in a dockerfile you can follow the documentation here , you also have several options for managing volumes named and created specifically

    
answered by 15.11.2016 / 09:21
source