We still have a problem with different parsing of env files in docker compose and docker run
Files:
.env.test
TEST_VAR='{"key": "value"}'
test.Dockerfile
FROM ubuntu
CMD echo "$TEST_VAR"
test.docker-compose.yaml
services:
service:
build:
dockerfile: test.Dockerfile
env_file: .env.test
image: test-image
Execution:
docker compose -f test.docker-compose.yaml up --build => {"key": "value"}
docker run --env-file .env.test test-image => '{"key": "value"}'
We need unified results, otherwise, apps may not work correctly
Docker version 27.1.1, build 6312585
Docker Compose version v2.29.1-desktop.1
Originally posted by @present-g in #2854 (comment)
We still have a problem with different parsing of env files in
docker composeanddocker runFiles:
.env.testTEST_VAR='{"key": "value"}'test.Dockerfiletest.docker-compose.yamlExecution:
docker compose -f test.docker-compose.yaml up --build=>{"key": "value"}docker run --env-file .env.test test-image=>'{"key": "value"}'We need unified results, otherwise, apps may not work correctly
Docker version 27.1.1, build 6312585
Docker Compose version v2.29.1-desktop.1
Originally posted by @present-g in #2854 (comment)