Docker.github.io: Need way to call a specific auto-created service container (e.g., compose/reference/scale.md)

Created on 23 Nov 2016  路  3Comments  路  Source: docker/docker.github.io

File: compose/reference/scale.md

Do different service instances get instance identifiers auto assigned, and is that value exposed to the running container as some environment variable, e.g. generic DOCKER_INSTANCE_INDEX, or service specific variant DOCKER_service_INSTANCE_INDEX?

areCompose

Most helpful comment

Each container has a unique name, but the name is not exposed to the container. https://github.com/docker/compose/issues/1503

All 3 comments

@nathanleclaire @dnephin @ManoMarks @mstanleyjones Can you take a look at this question, and shed some light here?

Each container has a unique name, but the name is not exposed to the container. https://github.com/docker/compose/issues/1503

@dnephin @shin- @nathanleclaire

Since this issue is under discussion in docker/compose#1503, I don't think it makes sense to update the docs with anything yet. If something changes per that issue, then we can update https://docs.docker.com/compose/reference/scale/ and https://docs.docker.com/compose/compose-file/#replicas with the information, and probably elsewhere in the docs.

Let me know if you disagree, and I'll re-open this.

Was this page helpful?
0 / 5 - 0 ratings