Create your network named 'yournetwork':
$ docker network create -d bridge yournetwork
You have created your own network now.
Verify it by typing
$network inspect yournetwork:
In the docker-compose.yml:
networks:
yournetwork: #TODO remove this hard-coded network reference
external:
name: ${NETWORK}
yourservice:
container_name: "your-container-name"
image: your-image-name:${TAG:-latest} #will pull the latest #tagged image of yours
ports:
- 8080:8080 #example localhost:8080
net: ${NETWORK}
Start it with:
$ NETWORK=yournetwork docker-compose-up
Posts mit dem Label docker swarm werden angezeigt. Alle Posts anzeigen
Posts mit dem Label docker swarm werden angezeigt. Alle Posts anzeigen
Mittwoch, 24. Juli 2019
Howto create Docker Network with Docker Compose - Communication between Services inside of a Container
Abonnieren
Posts (Atom)
NEW BLOG! http://cleancode.consulting/
Dear Reader, This Blog is closed and remains as an archive. Please find our new Blog at http://cleancode.consulting/
-
This is a fine one: if you only do have XML and nothing else, you can generate an XSD from the XML ( here ) and use the XSD to generate your...
-
Dear Reader, This Blog is closed and remains as an archive. Please find our new Blog at http://cleancode.consulting/