Reputation: 113
As one can do docker run -v ./volume_name:/path_in_container --name cont image
to create a container and a volume binds to the subdirectory volume_name, I want to create within the docker-compose.yml a volume associated with the subdirectory volumes/
I always get the following error:
ERROR: for test_authorization Cannot start service test_authorization: error while mounting volume '/var/lib/docker/volumes/exam_docker_logs/_data': failed to mount local volume: mount ./volumes:/var/lib/docker/volumes/exam_docker_logs/_data: no such device ERROR: Encountered errors while bringing up the project.
Here is my directory tree:
.
├── authentication
│ ├── Dockerfile
│ └── test_authentication.py
├── authorization
│ ├── Dockerfile
│ └── test_authorization.py
├── content
│ ├── Dockerfile
│ └── test_sentiment_analysis.py
├── docker-compose.yml
├── setup.sh
└── volumes
└── log.txt
Upvotes: 0
Views: 16