You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
how to set the service mode when using docker compose bundel on 1.12 #3743
so is there no way to set the replication strategy in the bundle (dab) file. This seems a bit of an omission to me as you may have wanted to deploy a stack which has say:
a monitoring container on each node (seamtext),
front end containers on the public nodes
back end containers (db, RPC) on the private nodes
I thought the .dab file was the equivalent configuration for services that docker-compose.yml files is for containers. Therefor we should be able to configure every service in the .dab in exactly the same way we can configure the service in docker service create. Else what is the point? I will have to deploy the bundle as a stack and then configure each service in the stack with docker service update.
I will have to deploy the bundle as a stack and then configure each service in the stack with docker service update.
Correct, but this is a temporary situation. Eventually there'll be a secondary file format for supplying environment-specific configuration, which is where replication strategies will go - alongside port mappings, mounts, and other non-portable configuration.
Right now there seems to be a rather strange mix of things that can or cannot be expressed using docker-compose files...
I can use affinity to say that I want each instance on another host, but I can't use the global service mode.
Then I can set the scale via command line of docker compose, but not via the config file.
Sorry this is a mess and why shouldn't we be allowed to set these values in a config file?
There are easy ways to parametrize that or use override configs that are environment specific.
Now we are forced to use a mix of calls of docker, docker-compose and settings in the config file to have the desired effects...
Any chance we can use this in compose file ?
I have a requirement where for a service there should be exactly one container on every node/host .
This doesn't happen with "spread strategy" of swarm if a node goes down & comes up , it just attains the equal number of containers on each host irrespective of services .
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.
Activity
aanand commentedon Jul 20, 2016
It's not currently possible. I don't think the service mode belongs in the bundle - it's an environment-specific concern.
Richard-Mathie commentedon Jul 21, 2016
so is there no way to set the replication strategy in the bundle (dab) file. This seems a bit of an omission to me as you may have wanted to deploy a stack which has say:
I thought the .dab file was the equivalent configuration for services that docker-compose.yml files is for containers. Therefor we should be able to configure every service in the .dab in exactly the same way we can configure the service in
docker service create. Else what is the point? I will have to deploy the bundle as a stack and then configure each service in the stack with docker service update.aanand commentedon Jul 21, 2016
Correct, but this is a temporary situation. Eventually there'll be a secondary file format for supplying environment-specific configuration, which is where replication strategies will go - alongside port mappings, mounts, and other non-portable configuration.
euforia commentedon Aug 26, 2016
Can the mode be specified when NOT using a bundle? i.e. In a standard version 2 docker-compose format.
pcornelissen commentedon Oct 10, 2016
Right now there seems to be a rather strange mix of things that can or cannot be expressed using docker-compose files...
I can use affinity to say that I want each instance on another host, but I can't use the global service mode.
Then I can set the scale via command line of docker compose, but not via the config file.
Sorry this is a mess and why shouldn't we be allowed to set these values in a config file?
There are easy ways to parametrize that or use override configs that are environment specific.
Now we are forced to use a mix of calls of docker, docker-compose and settings in the config file to have the desired effects...
viveky4d4v commentedon Oct 27, 2016
Any chance we can use this in compose file ?
I have a requirement where for a service there should be exactly one container on every node/host .
This doesn't happen with "spread strategy" of swarm if a node goes down & comes up , it just attains the equal number of containers on each host irrespective of services .
stale commentedon Oct 10, 2019
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.
stale commentedon Oct 17, 2019
This issue has been automatically closed because it had not recent activity during the stale period.
dockerignore: convert ignore patterns to absolute paths [ch9237] (doc…
dockerignore: convert ignore patterns to absolute paths [ch9237] (doc…
dockerignore: convert ignore patterns to absolute paths [ch9237] (doc…
dockerignore: convert ignore patterns to absolute paths [ch9237] (doc…
dockerignore: convert ignore patterns to absolute paths [ch9237] (#3743)