I use docker-compose
to create a few containers and create links between them. Assume I have a container called a
running which has a link to b
which is also running.
Can I easily inspect running containers to see which containers link to which?
I note that docker ps
lists running containers along with some helpful info, like what ports are exposed. Likewise docker-compose ps
provides the same kind of info. Neither appears to include an option to show links.
Edit
I try to docker inspect
my running containers, per Erazihel's answer below, and it looks like I have no links.
$ docker inspect -f "{{ .HostConfig.Links }}" docker_auth_1
[]
Perhaps docker-compose doesn't use links in the same way as it used to?
Assume I have a docker-compose.yml
that looks something like:
services:
auth:
image: my-auth-image
depends_on:
- db
networks:
- integration
db:
image: my-db-image
networks:
- integration
networks:
integration:
external: true
Perhaps my use of "networks" affects how links are shown?
I am on macOS Sierra running Docker Version 17.06.0-ce-mac18 (18433).