mirror of
https://github.com/wsargent/docker-cheat-sheet.git
synced 2025-12-16 15:10:12 +01:00
Add regular expression
This commit is contained in:
parent
56303f9634
commit
af10385d62
1 changed files with 6 additions and 0 deletions
|
|
@ -358,6 +358,12 @@ docker inspect -f '{{ .NetworkSettings.IPAddress }}' <container_name>
|
|||
docker inspect -f '{{range $p, $conf := .NetworkSettings.Ports}} {{$p}} -> {{(index $conf 0).HostPort}} {{end}}' <containername>
|
||||
```
|
||||
|
||||
### Find containers by regular expression
|
||||
|
||||
```
|
||||
for i in $(docker ps -a | grep "REGEXP_PATTERN" | cut -f1 -d" "); do echo $i; done`
|
||||
```
|
||||
|
||||
### Get Environment Settings
|
||||
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue