-
Notifications
You must be signed in to change notification settings - Fork 573
Closed
Description
Contributing guidelines
- I've read the contributing guidelines and wholeheartedly agree
I've found a bug and checked that ...
- ... the documentation does not mention anything about my problem
- ... there are no open or closed issues that are related to my problem
Description
buildx bake does not honor COMPOSE_PROJECT_NAME from environment variable or any .env file. This behavior changed from version 14 where the variable was set correctly.
Expected behaviour
Content of COMPOSE_PROJECT_NAME can be overridden with an environment variable.
Actual behaviour
COMPOSE_PROJECT_NAME is always set to "bake".
Buildx version
github.com/docker/buildx v0.15.1 1c1dbb2
Docker info
Client:
Version: 27.0.3
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.15.1
Path: /usr/local/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.28.1
Path: /usr/local/libexec/docker/cli-plugins/docker-compose
Builders list
NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS
default* error
Configuration
# .env
COMPOSE_PROJECT_NAME=anything
# docker-compose.yml
services:
php-fpm:
image: 'php-fpm:latest'
build:
context: .
dockerfile: './builds/Dockerfile'
args:
COMPOSE_PROJECT_NAME: ${COMPOSE_PROJECT_NAME}
docker buildx bake --print
# or
COMPOSE_PROJECT_NAME=something docker buildx bake --print
Build logs
[+] Building 0.0s (1/1) FINISHED
=> [internal] load local bake definitions 0.0s
=> => reading docker-compose.yml 219B / 219B 0.0s
{
"group": {
"default": {
"targets": [
"php-fpm"
]
}
},
"target": {
"php-fpm": {
"context": ".",
"dockerfile": "./builds/Dockerfile",
"args": {
"COMPOSE_PROJECT_NAME": "bake"
},
"tags": [
"php-fpm:latest"
]
}
}
}
Additional info
No response