nomadconsultant.blogg.se

Mac os docker image location
Mac os docker image location




mac os docker image location

Well, in order to do so we need to use a docker volume plugin. Original post using the docker volume plugin – 2018 What will happen when this named volume is used in a container is that /sqlserver will be mounted to /var/lib/docker/volumes/sqlserver/_dataĪnd there you have it, a named volume in a custom location

mac os docker image location

There we can see the device listed, /sqlserver, and the mount point, /var/lib/docker/volumes/sqlserver/_data. So let’s create a directory to point our named volume to: –Īnd now create the named volume using the local driver and the bind option, setting the device to our custom location: –ĭocker volume create -driver local -o o=bind -o type=none -o device=/sqlserver sqlserver

Mac os docker image location how to#

I’ve left the details of how to use the plugin below as it does work to move a named volume but the plugin has not been updated for a while so using the local driver is the preferred way. However, you can do this without using a plugin by using the docker local driver and the bind option, which I’ll go through here. This article originally only talked about using a docker volume plugin called Local Persist to change the location of a named volume. But what if we want to change that location?

mac os docker image location

You can see above where the named volume lives on the host. – I’ve previously written about persisting data using named volumes hereįirst let’s have a look at a named volume. They give me something to go away and investigate (many thanks to Dave Walden ( b| t) for his help!) This is one of the things that I love about presenting, being asked questions that I don’t know the answer to. The question was, “can you change the location of named volumes in docker?” A few weeks ago I was presenting at SQL Saturday Raleigh and was asked a question that I didn’t know the answer to.






Mac os docker image location