# Understand Docker Work
###### tags: `docker'
[TOC]
---
### 1: VM Network
bridge adapter is to connect the VM directly to home network
```
ip address show
```

if you have install docker, when you run previous command you will find dn name "docker0"
---
### 2: the Default Bridge

```
sudo docker network ls
```

the architecture mention 3 docker container name Thor, mjolnir, stormbreaker. and now I change it to zyzy, w-agf, pearl

```
sudo docker run -itd --rm --name zyzy busybox
sudo docker run -itd --rm --name w-agf busybox
sudo docker run -itd --rm --name pearl busybox
```

```
bridge link
```

```
sudo docker inspect bridge
```

docker0 as a switch and all docker container can talk each other all day.
#### NAT Masquerade
```
sudo docker exec -it zyzy sh
```

show ip address
```
ip add
```

ping to another container
```
ping 172.17.0.3
```

ping to google
```
ping 8.8.8.8
```

```
ip route
```

---