-
Notifications
You must be signed in to change notification settings - Fork 5.4k
[BUG] Path Evaluation Error on Windows #12669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you please share your compose file (at least, the |
tested with latest release (v2.34.0) and can't reproduce using this basic reproduction example: services:
test:
build: . |
services:
web:
build:
context: .
dockerfile: docker/web/Dockerfile |
@ndeloof I downloaded the latest release of Docker Compose (v2.34.0), but it didn’t work and produced the same error. I then randomly downgraded to Docker Compose v2.30.3, which worked fine. |
I have a similar issue when trying the COMPOSE_BAKE=true option. |
I got the same issue once setting COMPOSE_BAKE=true |
Would you have a chance to give #12721 a try ?
|
A point I don't get here, is that is seems compose is considering the dockerfile path |
Using Bake (COMPOSE_BAKE=true) causes the path issues. Disabling made things work again. |
@trulysinclair can you please run |
I have the same problem:
does NOT work with Bake config output from {
"group": {
"default": {
"targets": [
"ai-module",
"frontend",
"api"
]
}
},
"target": {
"ai-module": {
"context": "C:/Users/jelle/Desktop/reform/github/ai-module-prod",
"dockerfile": "C:\\Users\\jelle\\Desktop\\reform\\github\\ai-module-prod\\Dockerfile",
"args": {
"NAME": "agents",
"TYPE": "services"
},
"tags": [
"reform-ai-module"
],
"ssh": [
"wolfkey=C:/Users/jelle/.ssh/wolfkey"
],
"no-cache": true,
"output": [
"type=docker,load=true,push=false"
]
},
"api": {
"context": "C:/Users/jelle/Desktop/reform/github/api",
"dockerfile": "C:\\Users\\jelle\\Desktop\\reform\\github\\api\\Dockerfile",
"tags": [
"reform-api"
],
"no-cache": true,
"output": [
"type=docker,load=true,push=false"
]
},
"frontend": {
"context": "C:/Users/jelle/Desktop/reform/github/frontend",
"dockerfile": "C:\\Users\\jelle\\Desktop\\reform\\github\\frontend\\Dockerfile",
"tags": [
"reform-frontend"
],
"no-cache": true,
"output": [
"type=docker,load=true,push=false"
]
}
}
} Bake config output from {
"group": {
"default": {
"targets": [
"ai-module",
"api",
"frontend"
]
}
},
"target": {
"ai-module": {
"context": "C:/Users/jelle/Desktop/reform/github/ai-module-prod",
"dockerfile": "Dockerfile",
"args": {
"NAME": "agents",
"TYPE": "services"
},
"ssh": [
{
"id": "wolfkey",
"paths": [
"C:/Users/jelle/.ssh/wolfkey"
]
}
]
},
"api": {
"context": "C:/Users/jelle/Desktop/reform/github/api",
"dockerfile": "Dockerfile"
},
"frontend": {
"context": "C:/Users/jelle/Desktop/reform/github/frontend",
"dockerfile": "Dockerfile"
}
}
} |
I can confirm, yesterday I enabled these options trying to speed up the build and the problem occured
I'm using Windows 11 latest update, and WSL2 (Ubuntu 24.04.1 LTS) Docker integration. I'm using the latest Docker desktop version. Today, I removed these options, and the problem was solved. And it turns out that the build stage for my images is faster by about 40 seconds without these options anyway. This issue occures when trying to build docker images via powershell and not via WSL2. If you use WSL2 linux bash shell to build the docker images, you won't face this issue. |
issues has been fixed in Bake |
Description
I encountered a path evaluation error while trying to build my Docker image on Windows using the following command:
docker compose up --build
Error Message:
Steps To Reproduce
I encountered a path evaluation error while trying to build my Docker image on Windows using the following command:
docker compose up --build
Error Message:
Environment:
• OS: Windows 11
• Docker Version: 4.39.0 (184744)
• Docker Compose Version: v2.33.1-desktop.1
• Podman
Expected Behavior
Docker should correctly evaluate and resolve the path to the Dockerfile without errors.
Actual Behavior
Docker is appending an extra C: in the path, resulting in an invalid path that causes the build to fail.
Steps to Reproduce:
1. Run docker
compose up --build
in the project directory.2. Observe the error message.
Additional Information:
• I tried running the same configuration using Podman and it worked without any issues.
• I tried running the same configuration using Docker v4.27.2 and it worked without any issues.
Attempted Solutions:
• Verified that the
docker-compose.yml
contains the correct path to the Dockerfile.• Tried using relative and absolute paths, but the error persists.
• Tested with Podman, which worked correctly.
Compose Version
Docker Environment
Anything else?
The text was updated successfully, but these errors were encountered: