Docker compose: doesnt allow to use constraints if you have a env variable set
I have a docker compose that runs an Spring app, which receives some env variables and works fine. The environment section is: environment: app.host: 10.5.124.30 cache.enabled: "true" cmis.host: 10.5.100.48 cmis.username: testuser It works flawlessly, but what happens is that it doesn't run in the containers that I would like it to run. So I found that I could set constraints. That's what I did: environment: app.host: 10.5.124.30 cache.enabled: "true" cmis.host: 10.5.100.48 cmis.username: testuser - "constraint:application==sample" So what I noticed, if I keep the properties as they are, it complains about the format, so I tried this environment: - "app.host=10.5.124.30" - "acs.paas.host=10.5.100.48" - "cache.enabled=true" - "cmis.host=10.5.100.48" - "cmis.username=testuser" - "constraint:application==sample" It ended going to the right node but all my env variables got lost. I know that should be something simple, but I got lost here.
Name an image built from running a docker-compose file
Race conditions after changing names in docker-compose.yml
Docker compose - image not found
How to work out the hostname that compose gives containers?
docker-compose restart container if service is dead
Swarm scheduling not working as expected using filters in compose file
issues in buiding Slate with Docker
Invalid type error in Docker Compose
Django cookiecutter with Docker add pip package
Docker Compose + Swarm + Machine Networking issue
docker-compose build image parameters --force-rm --pull
linking 2 containers through docker compose
Files created by manage.py commands not chown'd from root user
Is it possible to create an intermediate image within docker-compose?
docker-compose service listen on specified interface
Does Docker-Compose allow overwriting of ports when using extends?