Docker:Network: Unterschied zwischen den Versionen
Aus Alexander's Wiki
Admin (Diskussion | Beiträge) |
Admin (Diskussion | Beiträge) |
||
Zeile 4: | Zeile 4: | ||
NETWORK ID NAME DRIVER SCOPE | NETWORK ID NAME DRIVER SCOPE | ||
1a1b39f6887e bridge bridge local | 1a1b39f6887e bridge bridge local | ||
699566f7a588 host host local | 699566f7a588 host host local | ||
cc3e0432c59a none null local | cc3e0432c59a none null local | ||
</syntaxhighlight>Quellen: | </syntaxhighlight>Im Netzwerk bridge die nutzenden Container anschauen<syntaxhighlight lang="bash"> | ||
$ docker network inspect bridge | |||
[ | |||
{ | |||
"Name": "bridge", | |||
"Id": "1a1b39f6887e87aa7a3c2215ea5bea86f3e7e1c9ba138d0d0bf8371a887b279c", | |||
"Created": "2022-09-21T11:35:00.1179896Z", | |||
"Scope": "local", | |||
"Driver": "bridge", | |||
"EnableIPv6": false, | |||
"IPAM": { | |||
"Driver": "default", | |||
"Options": null, | |||
"Config": [ | |||
{ | |||
"Subnet": "172.17.0.0/16", | |||
"Gateway": "172.17.0.1" | |||
} | |||
] | |||
}, | |||
"Internal": false, | |||
"Attachable": false, | |||
"Ingress": false, | |||
"ConfigFrom": { | |||
"Network": "" | |||
}, | |||
"ConfigOnly": false, | |||
"Containers": { | |||
"d74b8d5f9714b3063f66fcf4f60c1dcf5fc541656f070aa7a46312989e16f702": { | |||
"Name": "strange_lovelace", | |||
"EndpointID": "16754aeb446af03532ca737fd64df61321523ec4d88a5f5ad62bcba5473c1a54", | |||
"MacAddress": "02:42:ac:11:00:02", | |||
"IPv4Address": "172.17.0.2/16", | |||
"IPv6Address": "" | |||
} | |||
}, | |||
"Options": { | |||
"com.docker.network.bridge.default_bridge": "true", | |||
"com.docker.network.bridge.enable_icc": "true", | |||
"com.docker.network.bridge.enable_ip_masquerade": "true", | |||
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0", | |||
"com.docker.network.bridge.name": "docker0", | |||
"com.docker.network.driver.mtu": "1500" | |||
}, | |||
"Labels": {} | |||
} | |||
] | |||
</syntaxhighlight> | |||
Quellen: | |||
https://docs.docker.com/network/network-tutorial-standalone/ | https://docs.docker.com/network/network-tutorial-standalone/ | ||
https://www.freecodecamp.org/news/how-to-get-a-docker-container-ip-address-explained-with-examples/ | https://www.freecodecamp.org/news/how-to-get-a-docker-container-ip-address-explained-with-examples/ |
Aktuelle Version vom 21. September 2022, 13:16 Uhr
Anzeigen der Netzwerke
$ docker network ls
NETWORK ID NAME DRIVER SCOPE
1a1b39f6887e bridge bridge local
699566f7a588 host host local
cc3e0432c59a none null local
Im Netzwerk bridge die nutzenden Container anschauen
$ docker network inspect bridge
[
{
"Name": "bridge",
"Id": "1a1b39f6887e87aa7a3c2215ea5bea86f3e7e1c9ba138d0d0bf8371a887b279c",
"Created": "2022-09-21T11:35:00.1179896Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.17.0.0/16",
"Gateway": "172.17.0.1"
}
]
},
"Internal": false,
"Attachable": false,
"Ingress": false,
"ConfigFrom": {
"Network": ""
},
"ConfigOnly": false,
"Containers": {
"d74b8d5f9714b3063f66fcf4f60c1dcf5fc541656f070aa7a46312989e16f702": {
"Name": "strange_lovelace",
"EndpointID": "16754aeb446af03532ca737fd64df61321523ec4d88a5f5ad62bcba5473c1a54",
"MacAddress": "02:42:ac:11:00:02",
"IPv4Address": "172.17.0.2/16",
"IPv6Address": ""
}
},
"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
},
"Labels": {}
}
]
Quellen:
https://docs.docker.com/network/network-tutorial-standalone/
https://www.freecodecamp.org/news/how-to-get-a-docker-container-ip-address-explained-with-examples/