Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker - Host bridge
# 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.
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