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

Inconsistent behaviour with .env-File between docker-compose v1 and docker compose v2 #9447

Closed
wollomatic opened this issue May 6, 2022 · 2 comments

Comments

@wollomatic
Copy link

wollomatic commented May 6, 2022

Description

Handling of strings in the .env-Files differs between Compose V1 and Compose V2.
In V2 some characters are interpreted while they are unchanged in V1.
I didn't find any mention of the difference in the documentation.

Steps to reproduce the issue:
.env:

456=ABC
TESTVAR1=123#456
TESTVAR2=123$456

compose.yaml:

---
services:
  busybox:
    environment:
      TESTVAR1: $TESTVAR1
      TESTVAR2: $TESTVAR2
    image: busybox

Describe the results you received:

$ docker-compose config (Compose v1)

services:
  busybox:
    environment:
      TESTVAR1: 123#456
      TESTVAR2: 123$$456
    image: busybox
...

$ docker compose config (Compose v2)

name: compose_bugreport
services:
  busybox:
    environment:
      TESTVAR1: "123"
      TESTVAR2: 123ABC
    image: busybox
...

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker compose version:

Docker Compose version v2.5.0

and docker-compose version:

docker-compose version 1.29.2, build 5becea4c
...
@blacksheep--
Copy link

blacksheep-- commented May 16, 2022

I can confirm and this is not the only inconsistency between v1 and v2. See #9442 .

@ndeloof
Copy link
Contributor

ndeloof commented Dec 16, 2022

tested on latest release:

$ docker compose config
name: truc
services:
  busybox:
    environment:
      TESTVAR1: 123#456
      TESTVAR2: 123$$456

So, closing this one as "fixed"

@ndeloof ndeloof closed this as completed Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants