Posted over 5 years ago. Visible to the public.

Docker Compose Network

This example shows that how the static ip can be assigned to container and how to add another container network to a container. This can be done only for version 2 compose.

version: '2' services: app: image: busybox command: ping networks: app_net: ipv4_address: webapp: image: busybox command: ping network_mode: service:app networks: app_net: driver: bridge ipam: driver: default config: - subnet: gateway:

Owner of this card:

Last edit:
over 5 years ago
by vasan
docker, compose
Posted by vasan to vasan's deck
This website uses short-lived cookies to improve usability.
Accept or learn more