Skip to content

Environment interpolation regression in docker-compose.yml #2221

@ashb

Description

@ashb

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?)

Activity

self-assigned this
on Oct 19, 2015
ashb

ashb commented on Oct 19, 2015

@ashb
Author

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

aanand commented on Oct 19, 2015

@aanand

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

mnowster

mnowster commented on Oct 19, 2015

@mnowster

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

added this to the 1.5.0 milestone on Oct 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @aanand@ashb@dnephin@mnowster

      Issue actions

        Environment interpolation regression in docker-compose.yml · Issue #2221 · docker/compose