Give example of VOLUME command for Dockerfile
The command line method of creating a volume to "Mount a host directory as a data volume" is (for example)
docker run -p 1433:1433 -e SA_PASSWORD=blah e ACCEPT_EULA=Y -v H:/Data:/var/opt/mssql -d microsoft/mssql-server-linux
What would the equivalent Dockerfile syntax be? Give an example under the VOLUME section
File: engine/reference/builder.md, CC @mstanleyjones
#dibs for the hackathon
Read the note here https://docs.docker.com/engine/tutorials/dockervolumes/#mount-a-shared-storage-volume-as-a-data-volume
You cant mount host directory from Dockerfile as the image we are going to build should be host dir independent.
No action for two days, so this is up for grabs again!
@mstanleyjones please consider my comment. It is not possible to do same with Dockerfile as we do while running a container.
Read the note here https://docs.docker.com/engine/tutorials/dockervolumes/#mount-a-shared-storage-volume-as-a-data-volume
You cant mount host directory from Dockerfile as the image we are going to build should be host dir independent.
Should it be clarified here again? Just copying Note from here will be fine?
If yes, then I will do it.
claimed
@bhavin192 were you intending to claim this? If so, you were first. If not, please let @tippexs know they can have it.
@mstanleyjones yes, I want to claim it.
These files cannot be edited from here so I created PR https://github.com/moby/moby/pull/32735
Being reviewed upstream. :)
Merged upstream. Thanks @bhavin192 !
Closed via https://github.com/moby/moby/pull/32735
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
/lifecycle locked