Difference between revisions of "Docker compose: networks"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
(10 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
[[networks:]] | [[networks:]] | ||
elastic: | elastic: | ||
− | driver: [[bridge]] | + | [[Docker compose: driver:|driver:]] [[bridge]] |
== 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 == | ||
* <code>[[--link]]</code> deprecated option | * <code>[[--link]]</code> deprecated option | ||
− | + | [[ports: (Docker compose)]] | |
[[Category:Docker compose]] | [[Category:Docker compose]] | ||
− | |||
== Related terms == | == Related terms == | ||
− | * [[docker network]] | + | * <code>[[docker network ls]]</code> |
− | * [[docker network | + | * <code>[[docker network inspect]]</code> |
− | * [[docker network | + | * <code>[[docker network create]]</code> |
− | + | [[--network=host]] | |
== See also == | == See also == | ||
+ | * {{docker network}} | ||
* {{docker-compose}} | * {{docker-compose}} | ||
[[Category:Docker compose]] | [[Category:Docker compose]] |
Latest revision as of 09:49, 21 April 2024
https://docs.docker.com/compose/compose-file/#network-configuration-reference
networks: elastic: driver: bridge
Examples[edit]
Official:
services: proxy: image: example/proxy networks: - outside - default app: image: example/app networks: - default networks: outside: external: true
Related terms[edit]
--link
deprecated option
ports: (Docker compose)
Related terms[edit]
--network=host
See also[edit]
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: