I got a docker-compose file in which I want to set a context and docker file to look something like this:
build:
context: <path to context>
dockerfile: <path to dockerfile>
For now my file is in the root folder so its simply:
build:
context: .
dockerfile: .
This way it does work.
The structure of the project is something like this:
./
- folder1/
- folder2/
docker-compose.yaml
DockerFile
I want to copy files as part of the commands in the DockerFile and I want the paths to be relative to the root folder of the project.
How with this project structure do I set the context to be the root folder of the project? I tried doing context: ../../ but I then got an error:
Error response from daemon: unexpected error reading Dockerfile: read (path): is a directory
How do I set the context correctly?