Tutorial by Examples

Containers in the same docker network have access to exposed ports. docker network create sample docker run --net sample --name keys consul agent -server -client=0.0.0.0 -bootstrap Consul's Dockerfile exposes 8500, 8600, and several more ports. To demonstrate, run another container in the same ...
Networks can be specified in a compose file (v2). By default all the containers are in a shared network. Start with this file: example/docker-compose.yml: version: '2' services: keys: image: consul command: agent -server -client=0.0.0.0 -bootstrap test: image: alpine tty...
The docker --link argument, and link: sections docker-compose make aliases to other containers. docker network create sample docker run -d --net sample --name redis redis With link either the original name or the mapping will resolve the redis container. > docker run --net sample --link red...

Page 1 of 1