mirror of
/repos/baseimage-docker.git
synced 2025-12-30 08:01:31 +01:00
Use Go template instead of grep to extract container IP address
This commit is contained in:
parent
93572a5698
commit
f445cafe03
@ -314,7 +314,7 @@ Find out the ID of the container that you just ran:
|
||||
|
||||
Once you have the ID, look for its IP address with:
|
||||
|
||||
docker inspect <ID> | grep IPAddress
|
||||
docker inspect -f "{{ .NetworkSettings.IPAddress }}" <ID>
|
||||
|
||||
Now SSH into the container as follows:
|
||||
|
||||
@ -352,7 +352,7 @@ Find out the ID of the container that you just ran:
|
||||
|
||||
Once you have the ID, look for its IP address with:
|
||||
|
||||
docker inspect <ID> | grep IPAddress
|
||||
docker inspect -f "{{ .NetworkSettings.IPAddress }}" <ID>
|
||||
|
||||
Now SSH into the container as follows:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user