Browse Source

add docker network

master
markuman 4 years ago
parent
commit
87a115fb10
  1. 5
      til.md

5
til.md

@ -66,6 +66,11 @@ Delete all containers
* `docker rm $(docker ps -a -q)`
Delete all images
* `docker rmi $(docker images -q)`
Create docker network
* `docker network create mynet`
run two docker `img` container with different names `foo` and `bar` and the can reach each other with domain name `foo` and `bar`
* `docker run --name foo --net mynet img`
* `docker run --name bar --net mynet img`
## git

Loading…
Cancel
Save