You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My issue is about the documentation content or website
Type of issue
Information is incorrect
Description
In the documentation is indicated
docker run -v /doesnt/exist:/foo -w /foo -i -t ubuntu bash
When the host directory of a bind-mounted volume doesn't exist, Docker automatically creates this directory on the host for you. In the example above, Docker creates the /doesnt/exist folder before starting your container.
I get an error
docker: Error response from daemon: error while creating mount source path 'XXX/doesnt/exist': chown 'XXX/doesnt/exist: permission denied.
ERRO[0000] error waiting for container:
It's truth that
folder is created -- Example: run ls to check --
container has run -- docker ps --all --
👁️ but the command itself passed -- docker run ... bash -- has failed 👁️
Is there some way to give the permissions to that folder automatically created by Docker to avoid getting the error?
If you run the same command again, it works ... 🤔
If there is NO way to get the command succeed -> I would specify in this section of the documentation, because it can confuse to the reader of the documentation, such as
When the host directory of a bind-mounted volume doesn't exist, Docker automatically creates this directory on the host for you. In the example above, Docker creates the /doesnt/exist folder before starting your container, although in the output of the command you get an error
The text was updated successfully, but these errors were encountered:
Is this a docs issue?
Type of issue
Information is incorrect
Description
In the documentation is indicated
docker run -v /doesnt/exist:/foo -w /foo -i -t ubuntu bash
I get an error
It's truth that
ls
to check --docker ps --all
--👁️ but the command itself passed --
docker run ... bash
-- has failed 👁️Notes:
Location
https://docs.docker.com/reference/cli/docker/container/run/#volume
Suggestion
The text was updated successfully, but these errors were encountered: