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

.env load values with double quotes escaped #721

Open
aventrax opened this issue Jul 5, 2023 · 0 comments
Open

.env load values with double quotes escaped #721

aventrax opened this issue Jul 5, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@aventrax
Copy link

aventrax commented Jul 5, 2023

Describe the bug

I think there a bug that were on docker-compose some time ago.

As stated here, the variables declared on the dotenv can be quoted or not. A simple string does not require anything, as well as an integer, but with a whitespace we need to use some kind of quotes.

NAME="Mike White"
AGE=33

Within a container created by docker compose, this happens:

root@65e1bca70a68:/app# echo $NAME
Mike White
root@65e1bca70a68:/app# echo $AGE
33

BUT, within a podman container created by podman-compose, this happens:

root@10f2d76c465a:/app# echo $NAME
"Mike White"
root@10f2d76c465a:/app# echo $AGE
33

To Reproduce

.env

NAME="Mike White"
AGE=33

docker-compose.yaml

version: "3.7"

services:
  app:
    build:
      context: .
      dockerfile: ./Dockerfile
    env_file: .env

podman-compose up -d

Enter the container interactively, type echo $NAME

Expected behavior
The double quotes should have been stripped

Actual behavior
The double quotes are there

Output

$ podman-compose version
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.4.1
podman-compose version 1.0.6
podman --version
podman version 4.4.1
exit code: 0

$ podman-compose up
...

Environment:

  • OS: Linux RHEL 8.8
  • podman version: 4.4.1
  • podman compose version: 1.0.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant