View container run logs

[Python]

Plain text view
Copy the code

?
1
2
3
4
# command format:
Docker logs [containers
id
]
# command effect:
$ docker logs
7c5a24a68f96


View container details

[Python]

Plain text view
Copy the code

?
1
2
3
4
5
6
7
# command format:
Docker inspect [container
id
]
# command effect:
View all container information:
$ docker inspect
930f29ccdf8a
View container network information:
$ docker inspect
-
-
format
=
'{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}'
930f29ccdf8a


View container port information

[Python]

Plain text view
Copy the code

?
1
2
3
4
5
# command format:
Docker port [container
id
]
# command effect:
$ docker port
930f29ccdf8a
There is no link with the host mechanism


Container renaming

[Python]

Plain text view
Copy the code

?
1
2
3
4
5
6
The role of # :

Change the container name
# command format:

Docker rename [a container
id
] or [Container name] [New container name]
# command effect:
$ docker rename
930f29ccdf8a
u1


conclusion





More learning materials can be paid attention to :itheimaGZ