Compose: Add mock implementation of configs to match secrets

Created on 1 Mar 2018  路  8Comments  路  Source: docker/compose

This issue relates to #4994 and #5110, and possibly #5684.

Docker Compose currently has a mock implementation of secrets using host binds. However, this does not apply to configs. The difference between the two is rather inconvenient when designing Compose files that are meant to work via both docker-compose up and docker swarm deploy.

My workarounds so far have been to declare configs as secrets, or manually write in host binds in volumes: in addition to having configs. It would be preferable if Docker Compose applied the same mock implementation of secrets to configs.

kinquestion stale

Most helpful comment

Thanks, @shin-! It's just frustrating that the disparity between secrets and configs seems so arbitrary. It doesn't make sense to me why there is a commitment to mock one but not the other in Docker Compose, regardless of how the two features diverge over time under Docker Swarm.

All 8 comments

As I outlined previously (here), the concern is that we'll commit to support an emulation of the configs feature even after it starts diverging, possibly significantly, from secrets. We're looking at what our options are to do this right, but this is probably going to take some time.

Thanks, @shin-! It's just frustrating that the disparity between secrets and configs seems so arbitrary. It doesn't make sense to me why there is a commitment to mock one but not the other in Docker Compose, regardless of how the two features diverge over time under Docker Swarm.

Things like that lead me to think that docker stack will replace docker-compose.

Since configs can not overwrite existing files in container file system, how are you supposed to test your images locally if "configs" options is not available via docker-compose?

@artisticcheese Technically I don't think anything is preventing you from using docker stack locally with a single-node Swarm if your application depends significantly on configs.

@shin- Does your thought include being able to bind mount folders for development?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed because it had not recent activity during the stale period.

Was this page helpful?
0 / 5 - 0 ratings