Linux/Docker/Networking: Difference between revisions

From Wiki
< Linux‎ | Docker
mNo edit summary
mNo edit summary
Line 8: Line 8:
docker network create wireguard
docker network create wireguard
docker network create --subnet 172.1.50.0/24 wireguard
docker network create --subnet 172.1.50.0/24 wireguard
docker network inspect wireguard
</pre>
</pre>


[[Category:Linux/Docker]]
[[Category:Linux/Docker]]
[[Category:Linux]]
[[Category:Linux]]

Revision as of 20:03, 15 November 2023

  • List docker container with IPs
docker ps -q | xargs -n 1 docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} {{ .Name }}' | sed 's/ \// /'
  • Create docker network
docker network create wireguard
docker network create --subnet 172.1.50.0/24 wireguard
docker network inspect wireguard