I have run on the Windows command prompt (I have the Linux subsystem for Windows installed):
docker run -d --name privacy-mysql -e MYSQL_ROOT_PASSWORD=DockerPasswort! -e MYSQL_DATABASE=privacy-database -v C:/Users/Alexa/OneDrive/Backend_web_architecture/github_repos/data-privacy-api/db/db_records:/var/lib/mysq"l -v C:/Users/Alexa/OneDrive/Backend_web_architecture/github_repos/data-privacy-api/db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d" --network privacy-network -dit -p 3306:3306 mysql:latest --default-authentication-plugin=mysql_native_password
This throws:
The source path "/Users/Alexa/OneDrive/Backend_web_architecture/github_repos/data-privacy-api/db/db_records:/var/lib/mysql -v C:/Users/Alexa/OneDrive/Backend_web_architecture/github_repos/data-privacy-api/db/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d"
too many colons.
See 'docker run --help'.
I though the colon at e.g. db_records:/var
is necessary? What would I need to fix this?
Thank you for your help!
If you look at the output
A volume mapping is specified as:
{locationOnHost}:{locationInsideContainer}
Since the volume you're mapping contains a colon (C:...) - docker will take this as the seperator in the mapping
You can use WSL's wslpath
to convert this to a *nix safe path e.g.
wslpath -a 'C:\a\b\ccc\'
results in
/mnt/c/a/b/ccc/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With