Difference between revisions of "Docker compose: networks"
Jump to navigation
Jump to search
m (Brave moved page Docker-compose: networks to Docker compose: networks) |
|||
Line 12: | Line 12: | ||
== Examples == | == Examples == | ||
* [[ElasticSearch docker-compose example]] | * [[ElasticSearch docker-compose example]] | ||
+ | |||
+ | Official: | ||
+ | <pre> | ||
+ | services: | ||
+ | proxy: | ||
+ | image: example/proxy | ||
+ | networks: | ||
+ | - outside | ||
+ | - default | ||
+ | app: | ||
+ | image: example/app | ||
+ | networks: | ||
+ | - default | ||
+ | |||
+ | networks: | ||
+ | outside: | ||
+ | external: true | ||
+ | </pre> | ||
== Related terms == | == Related terms == |
Revision as of 09:43, 21 April 2024
https://docs.docker.com/compose/compose-file/#network-configuration-reference
networks: elastic: driver: bridge
Examples
Official:
services: proxy: image: example/proxy networks: - outside - default app: image: example/app networks: - default networks: outside: external: true
Related terms
--link
deprecated option
Related terms
--network=host
See also
docker network [ ls | inspect
|create
|prune
], --networkdocker-compose
,docker-compose.yml
: [services
|volumes
|networks
|up
|down
|restart
|logs
|create
|changelog
|version
|secrets
|config
|-v
|-h
|exec], docker-compose pull
,Environment:
, Docker-compose.yml examples,.env
, release notes, expose:, docker-compose --env-file,services.deploy.resources
Advertising: