To Reproduce
- Have a repo where a
Dockerfile lives in a subdirectory and references a file that lives elsewhere in the repo, e.g.:
.
├── shared/
│ └── config.json
└── docker/
└── api/
└── Dockerfile
with docker/api/Dockerfile containing:
FROM alpine
COPY shared/config.json /app/config.json
- In Dokploy, create a
Dockerfile-type application and set the Dockerfile path to docker/api/Dockerfile.
- Leave the
Docker Context Path field empty (its placeholder implies the default is ., i.e. the repo root).
- Deploy.
- The build fails because
shared/config.json isn't present in the build context — Dokploy used docker/api/ as the context instead of the repo root:
#5 [2/2] COPY shared/config.json /app/config.json
#5 ERROR: failed to calculate checksum of ref ...: "/shared/config.json": not found
For comparison, an equivalent Compose-type app with compose.yaml declaring context: . and dockerfile: docker/api/Dockerfile builds the same Dockerfile correctly, since it actually uses the repo root as context.
Current vs. Expected behavior
Expected: with Docker Context Path left empty, the build context defaults to the application's code root ., matching the field's own placeholder and matching how docker compose build resolves the same Dockerfile.
Actual: the build context defaults to the Dockerfile's own directory instead, so any file reference outside that directory 404s during the build.
Provide environment information
Operating System:
OS: Ubuntu (self-hosted VPS)
Arch: amd64
Dokploy version: 0.30.6
VPS Provider: (self-hosted / on-prem)
What applications/services are you trying to deploy?
Dockerfile-type applications in a monorepo, where the Dockerfile lives in a
subdirectory (e.g. docker/<service>/Dockerfile) and COPYs files from the repo
root, matching the context: . setting used by the equivalent compose.yaml.
Which area(s) are affected? (Select all that apply)
Docker, Application
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
No response
Will you send a PR to fix it?
Maybe, need help
To Reproduce
Dockerfilelives in a subdirectory and references a file that lives elsewhere in the repo, e.g.:docker/api/Dockerfilecontaining:Dockerfile-type application and set the Dockerfile path todocker/api/Dockerfile.Docker Context Pathfield empty (its placeholder implies the default is., i.e. the repo root).shared/config.jsonisn't present in the build context — Dokploy useddocker/api/as the context instead of the repo root:For comparison, an equivalent Compose-type app with
compose.yamldeclaringcontext: .anddockerfile: docker/api/Dockerfilebuilds the sameDockerfilecorrectly, since it actually uses the repo root as context.Current vs. Expected behavior
Expected: with
Docker Context Pathleft empty, the build context defaults to the application's code root., matching the field's own placeholder and matching howdocker compose buildresolves the sameDockerfile.Actual: the build context defaults to the
Dockerfile's own directory instead, so any file reference outside that directory 404s during the build.Provide environment information
Which area(s) are affected? (Select all that apply)
Docker, Application
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
No response
Will you send a PR to fix it?
Maybe, need help