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 file variables are not interpolated into docker-compose.yaml when using docker compose #1137

Open
AttilaTheFun opened this issue Nov 4, 2021 · 0 comments

Comments

@AttilaTheFun
Copy link

I'm trying to migrate my docker-compose v1 application from DigitalOcean to AWS with the new docker compose v2 system using an ECS context.

I can run docker compose --env-file .env config with the default context and verify that the parameters are interpolated correctly, but when I switch to an ECS context, this stops working.

docker-compose.yaml:

version: "3"
services:
  web:
    container_name: web
    image: ${DOCKER_REGISTRY}/web:latest

.env:

DOCKER_REGISTRY=example.com

The ECS context can read + interpolate exported environment variables from the shell, but not the .env file.

If this is by design, it should not fail silently and should throw an error saying this feature of docker compose is not supported. Otherwise, this should be tracked as a bug.

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

1 participant