mirror of
https://github.com/wsargent/docker-cheat-sheet.git
synced 2025-09-21 21:30:48 +02:00
Add get port mapping
This commit is contained in:
parent
3d279d2c17
commit
85aa12cc40
1 changed files with 6 additions and 0 deletions
|
@ -338,6 +338,12 @@ or (this is unverified)
|
|||
docker inspect -f '{{ .NetworkSettings.IPAddress }}' <container_name>
|
||||
```
|
||||
|
||||
### Get port mapping
|
||||
|
||||
```
|
||||
docker inspect -f '{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' <containername>
|
||||
```
|
||||
|
||||
### Get Environment Settings
|
||||
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue