I solved the same problem with below commands
docker run --mount type=bind,source="$(pwd)"/data,target=/home/data -it <name_of_container>
Note “-it conainter_name” should be the last flags.
More Related Contents:
- Docker mount to folder overriding content
- What is the purpose of VOLUME in Dockerfile
- How to access host port from docker container [duplicate]
- How to run a cron job inside a docker container?
- Where are Docker images stored on the host machine?
- How do I get into a Docker container’s shell?
- What is linux equivalent of “host.docker.internal” [duplicate]
- How can I keep a container running on Kubernetes?
- Permission denied on accessing host directory in Docker
- Multiple FROMs – what it means
- What is the difference between a Docker image and a container?
- Docker : Can a container A call an executable located on an other container B?
- accessing a docker container from another container
- docker run
- Expose multiple api uri on the same nginx server block
- How do I mount a host directory as a volume in docker compose
- COPY with docker but with exclusion
- ARG or ENV, which one to use in this case?
- Why the “none” image appears in Docker and how can we avoid it
- Where is a log file with logs from a container?
- Docker CE on RHEL – Requires: container-selinux >= 2.9
- Bind to docker socket on Windows
- docker-compose build environment variable
- How to flatten a Docker image?
- How to SSH into Docker?
- docker-compose: difference between networks and links
- How to directly mount NFS share/volume in container using docker compose v3
- What is the use of Docker ‘host’ and ‘none’ Networks?
- how to set ulimit / file descriptor on docker container the image tag is phusion/baseimage-docker
- What is the purpose of the file “docker.sock”?