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

Environment interpolation regression in docker-compose.yml #2221

Closed
ashb opened this issue Oct 19, 2015 · 3 comments
Closed

Environment interpolation regression in docker-compose.yml #2221

ashb opened this issue Oct 19, 2015 · 3 comments
Assignees
Labels
Milestone

Comments

@ashb
Copy link

ashb commented Oct 19, 2015

I #1765 caused a small regression in behaviour. My docker-compose.yml looks like this:

postgres:
  container_name: mailserverdocker_postgres
  build: postgres
  environment:
    POSTGRES_PASSWORD:
    PGDATA: /var/lib/postgresql/data/pgdata
  volumes:
    # This is not on the host but on the docker-machine. Cos VMHGFS permissions
    # are fail. FULL OF FAIL AND PERMISSIONS ERRORS
    - /docker-volumes/run/pg-data:/var/lib/postgresql/data

On docker-compose 1.4.2 this would use the POSTGRES_PASSWORD env var from runtime at docker-compose up - now it gives this error:

Service 'postgres' configuration key 'environment' 'POSTGRES_PASSWORD' contains None, which is an invalid type, it should be a stringnumber or a boolean

I can fix it by changing to POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} -- I'm just not sure if this regression was intentional or not? It wasn't clear from the Changelog that this would break.

(Maybe just a documentation change and a note in the changelog about this being a (small) breaking change is enough here?)

@mnowster mnowster self-assigned this Oct 19, 2015
@ashb
Copy link
Author

ashb commented Oct 19, 2015

I didn't say that very clearly: Both of these worked in v1.4.2:

  • POSTGRES_PASSWORD=foo docker-compose up postgres password is "foo"
  • docker-compose up postgres password is empty string (but nothing complained about it's absence)

With v1.5.0rc1 only the first works.

@aanand
Copy link

aanand commented Oct 19, 2015

I believe this was caused not by #1765 but by #1808.

@mnowster
Copy link

@aanand @ashb I'm fixing it, I'm fixing it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants