Created
June 1, 2017 13:26
-
-
Save martinrusev/7312612a4c1e3e7f4fb8f2cdd9934c81 to your computer and use it in GitHub Desktop.
Docker - Host bridge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://forums.docker.com/t/accessing-host-machine-from-within-docker-container/14248/5 | |
docker network create -d bridge --subnet 192.168.0.0/24 --gateway 192.168.0.1 dockernet | |
# Now each container can connect to the host under the fixed IP 192.168.0.1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
db: | |
image: some/image | |
networks: | |
- dockernet | |
networks: | |
dockernet: | |
external: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment