Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

docker bind mount volume named like "ts_00:00:00", i.e. with a column in name

I realized that I am unable to execute bind mount with a volume that has a column in name, e.g.

docker run -v /mnt/fs/ts_00\:00\:00:/mnt/data container_name bash

fails with

docker: Error response from daemon: invalid volume specification: '/mnt/fs/ts_00:00:00:/mnt/data'.

I wonder if it is possible to get a volume with columns in the name to bind mount inside a docker container.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

use --mount instead of -v because colon is a the divider of source/target in the -v argument (source)

Was not sure if ts_00:00:00 is a file or a directory

I ran this and this works

mkdir "ts_00:00:00"
docker run --rm --mount type=bind,source=$(pwd)/ts_00:00:00/,destination=/tmp/hi -it bash

tried to prepare the command for you based on what you provided, but not sure if it’s correct

docker run --mount type=bind,source=/mnt/fs/ts_00:00:00,destination=/mnt/data -it container_name bash

see more in the GitHub ishue

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading