Skip to content
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

[BUG] usage of --env-file regressed from v2.27.0 to v2.27.1 #11906

Closed
frederikhs opened this issue Jun 14, 2024 · 4 comments
Closed

[BUG] usage of --env-file regressed from v2.27.0 to v2.27.1 #11906

frederikhs opened this issue Jun 14, 2024 · 4 comments

Comments

@frederikhs
Copy link

Description

Docker Compose v2.27.1 ignores the use of --env-file such as docker compose --env-file .env.prod config to override variable for the compose project.

Steps To Reproduce

I have created a repository with a github action workflow that runs the comparison test i expect is the regression: https://github.com/frederikhs/docker-compose-env-file-regression-example

Compose Version

Docker Compose version 2.27.1

Docker Environment

Client:
 Version:    26.1.4
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  0.15.0
    Path:     /usr/lib/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  2.27.1
    Path:     /usr/lib/docker/cli-plugins/docker-compose

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 10
 Server Version: 26.1.4
 Storage Driver: overlay2
  Backing Filesystem: btrfs
  Supports d_type: true
  Using metacopy: true
  Native Overlay Diff: false
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: ae71819c4f5e67bb4d5ae76a6b735f29cc25774e.m
 runc version:
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.9.4-arch1-1
 Operating System: Arch Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 31.27GiB
 Name: rod
 ID: 5113613f-ff7b-475d-842d-d612d2132447
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Anything else?

No response

@ndeloof
Copy link
Contributor

ndeloof commented Jun 16, 2024

Probably fixed by #11889
Would you have a chance to test your reproduction example with a build fro HEAD ?

@frederikhs
Copy link
Author

I have added a second job testing v2.27.0 against the latest commit to the default branch (commit id 1a14fcb) as of now. Seems like the issue is fixed. https://github.com/frederikhs/docker-compose-env-file-regression-example/actions/runs/9536725132/job/26283982723

What are the chances of a v2.27.2 release sometime in the near future?

@AdamYogan
Copy link

After upgrade, when using docker compose --env-file .env environment variable COMPOSE_PROFILES in .env stop working :-(

@ndeloof
Copy link
Contributor

ndeloof commented Jun 17, 2024

Closing as "fixed on HEAD"
A new release should come soon-ish

@ndeloof ndeloof closed this as not planned Won't fix, can't repro, duplicate, stale Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants