When docker starts the container, this command is as follows:docker run -d -p 5000:5000 --name registry01 -v /Users/lant/Desktop/registry:/etc/docker/registry -v /Users/lant/Desktop/docker:/var/lib/registry registry
Found that the result port mapping failed, but using a -v successfully mapped!
Can’t you mount multiple local directories into the container?
Another question is: Can a local file be directly mapped as a file in a container?
Official website:https://docs.docker.com/regis …
hit the target
docker run -d -p 5000:5000 --restart=always --name registry \
-v `pwd`/config.yml:/etc/docker/registry/config.yml \
registry:2
What the hell is the order above, which onepwd
What does it do? This order was not executed successfully at all.
You can mount multiple directories, it is recommended that you paste the error, and that’ pwd’ means the current directory. you can change it to $PWD and run it, provided that you have config.yml in your current directory.