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 run not responding to command-line "–mount" and "–name" options

My question might look like a repeat of Docker run mounting volumes but docker inspect has volumes as null, but it does not address my situation. I run a command like

docker run -d my-image --name my-name -v /host/path:/container/path

The container starts without complaint. But when I run docker inspect it shows

"Volumes": null
...
"Name": "/blissful_napier",

So it does not seem to respond to any of the command-line options I passed.

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

The answer to the linked question has something to do with anonymous volumes. I don’t think this is related to my problem.

>Solution :

All docker flags must be specified before the image name:

$ docker run -d --name my-name -v /host/path:/container/path my-image

everything that comes after the image name is passed to the entrypoint of the image.

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