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?
@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.
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