Reputation: 1
I'm working on a project where I use the CVAT repository as a submodule. When I navigate to the cvat directory and run the following command, everything works perfectly:
cd cvat && docker compose up -d
However, I want to streamline my setup by creating a composite docker-compose.yml file in the root of my main project that includes the docker-compose.yml from the cvat submodule. My project directory structure looks like this:
project-root/
├── docker-compose.yml
├── cvat/
│ ├── docker-compose.yml
│ └── ...
Here’s my main docker-compose.yml file:
include:
- cvat/docker-compose.yml
When I run docker compose up -d
from the root of my project, the containers start correctly but i get errors on the app when checking the logs of the container i can see:
PermissionError: [Errno 13] Permission denied: '/home/django/data/data'
Which doesnt happen when single running CVAT, shouldn't docker compose's include
handle relative paths correctly?
What is the proper way to include a submodule's docker-compose.yml file in my main compose file so that all paths and dependencies are resolved correctly?
Any suggestions or examples would be greatly appreciated. Thanks!
I attempted to use include to reference the cvat/docker-compose.yml directly from my main docker-compose.yml. I expected Docker to resolve paths in the cvat submodule's docker-compose.yml relative to its location (the cvat directory) or to automatically handle the path resolution.
Upvotes: 0
Views: 21