Skip to content

Commit

Permalink
Update docker_cli_one_liners.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdalert committed Apr 8, 2016
1 parent e534215 commit ef28e1b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docker_cli_one_liners.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,14 @@ docker inspect --format "{{ .NetworkSettings.IPAddress }}" $(docker ps -q)
#Get the IP address of the last started container
docker inspect --format "{{ .NetworkSettings.IPAddress }}" $(docker ps -ql)
# If the network is a network you created simply using grep on docker inspect is quick
$ docker network inspect mcv1 | grep -i ipv4
"IPv4Address": "192.168.1.106/24",
# Or look at the gateway of the network
$ docker network inspect mcv1 | grep Gateway
"Gateway": "192.168.1.1/24"
#stop and delete a container by name
docker stop <image_name> && docker rm flow_img
Expand Down

0 comments on commit ef28e1b

Please sign in to comment.