mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-21 21:02:22 +00:00
Update cheatsheets
This commit is contained in:
@@ -18,20 +18,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display a container's IP address:
|
||||
|
||||
`docker inspect --format '\{\{range.NetworkSettings.Networks\}\}\{\{.IPAddress\}\}\{\{end\}\}' {{container}}`
|
||||
`docker inspect {{[-f|--format]}} '\{\{range.NetworkSettings.Networks\}\}\{\{.IPAddress\}\}\{\{end\}\}' {{container}}`
|
||||
|
||||
- Display the path to the container's log file:
|
||||
|
||||
`docker inspect --format='\{\{.LogPath\}\}' {{container}}`
|
||||
`docker inspect {{[-f|--format]}} '\{\{.LogPath\}\}' {{container}}`
|
||||
|
||||
- Display the image name of the container:
|
||||
|
||||
`docker inspect --format='\{\{.Config.Image\}\}' {{container}}`
|
||||
`docker inspect {{[-f|--format]}} '\{\{.Config.Image\}\}' {{container}}`
|
||||
|
||||
- Display the configuration information as JSON:
|
||||
|
||||
`docker inspect --format='\{\{json .Config\}\}' {{container}}`
|
||||
`docker inspect {{[-f|--format]}} '\{\{json .Config\}\}' {{container}}`
|
||||
|
||||
- Display all port bindings:
|
||||
|
||||
`docker inspect --format='\{\{range $p, $conf := .NetworkSettings.Ports\}\} \{\{$p\}\} -> \{\{(index $conf 0).HostPort\}\} \{\{end\}\}' {{container}}`
|
||||
`docker inspect {{[-f|--format]}} '\{\{range $p, $conf := .NetworkSettings.Ports\}\} \{\{$p\}\} -> \{\{(index $conf 0).HostPort\}\} \{\{end\}\}' {{container}}`
|
||||
|
||||
Reference in New Issue
Block a user