简体   繁体   中英

How to run docker with bind mount in windows?

Please, observe:

C:\work\azure-voting-app-redis [master ≡ +1 ~1 -0 !]> docker run -it tiangolo/uwsgi-nginx-flask:python3.6 --mount 'type=bind,source=c:\work\azure-voting-app-redis\azure-vote\ca-certs,target=/ca-certs' bash
/entrypoint.sh: 46: exec: --mount: not found
C:\work\azure-voting-app-redis [master ≡ +1 ~1 -0 !]>

All I am trying to do is run bash from the given image while mounting a local directory into the container. The error is not very helpful.

I am running it on Windows in a powershell console.

What am I doing wrong (besides running it on Windows) ?

Stupid me. My command line was incorrect. I should have mentioned --mount before -it , like this:

docker run  --mount 'type=bind,source=c:\work\azure-voting-app-redis\azure-vote\ca-certs,target=/ca-certs' -it tiangolo/uwsgi-nginx-flask:python3.6 bash

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM