Eshoponcontainers: [QUESTION] How does this docker environment configuration work?

Created on 21 Mar 2017  路  2Comments  路  Source: dotnet-architecture/eShopOnContainers

I don't know if it's suitable to ask the question here, feel free to close/delete it if not.

I see something like below in docker-compose files.

ordering.api:
  environment:
    - identityUrl=http://identity.api:5105

In the Startup.cs of Ordering.API project, the configuration value (I think it's http://identity.api:5105) is used. How does it work? Or somewhere else identity.api will be translated to the correct address?

Most helpful comment

Hi @FDUdannychen
Basically, all docker containers started by docker-compose run in the same network, created by Docker. Under this network containers can see between them by using their name (name defined in the docker-compose file).
If you look docker-compose.yml file you'll see that the container running Identity Server is named "identity.api". That means that any other container can access this container using this name (identity.api).

All 2 comments

Hi @FDUdannychen
Basically, all docker containers started by docker-compose run in the same network, created by Docker. Under this network containers can see between them by using their name (name defined in the docker-compose file).
If you look docker-compose.yml file you'll see that the container running Identity Server is named "identity.api". That means that any other container can access this container using this name (identity.api).

Closing the issue after Eduard explanation.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dgaspar picture dgaspar  路  4Comments

arindams621 picture arindams621  路  5Comments

grahamehorner picture grahamehorner  路  5Comments

Dudelsb picture Dudelsb  路  3Comments

wely picture wely  路  5Comments