User Defined Bridge on Docker Network

source image : deploybot.com

Differences between user-defined bridges and the default bridge

sudo docker network create --driver bridge alpine-net
sudo docker network ls
sudo docker network inspect alpine-net
sudo docker run -dit --name alpine1 alpine ashsudo docker run -dit --name alpine2 --network alpine-net alpine ashsudo docker run -dit --name alpine3 alpine ashsudo docker network connect alpine-net alpine3
sudo docker network inspect bridge
sudo docker network inspect apline-net
sudo docker attach alpine3
ping -c 3 172.17.0.2
ping -c 3 alpine1
ping -c 3 alpine2
# ping -c 3 172.17.0.2
ping internet succeed
# ping -c 3 8.8.8.8

--

--

--

This is my little notes based my experiment and my learning. Keep learning and keep calm.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Hakim

Hakim

This is my little notes based my experiment and my learning. Keep learning and keep calm.

More from Medium

Install WordPress with Docker Nginx Reverse Proxy to Apache with SSL

MySQL with Docker

Docker architecture

Getting Started with Docker — Part 01

LEARN TO DEPLOY POSTGRES HA ON KUBERNETES IN 60 MINUTES