Home > Article > Operation and Maintenance > How to check the created container ID in docker
Two ways to query the container id
1. Use docker ps -aqf “name=containername”
2. docker inspect --format= "{{.Id}}" container_name
Instance:
Method 1:
[root@node1 filebeat]# docker ps -aqf "name=test2" 0f0b77cd0c53 [root@node1 filebeat]#
Method 2:
# docker inspect --format="{{.Id}}" test2 0f0b77cd0c53e82193c5e2e9b18d1e18a0d4dc77094284f0f6761cff76925eb2
More related tutorials , please pay attention to the docker tutorial column of the PHP Chinese website.
The above is the detailed content of How to check the created container ID in docker. For more information, please follow other related articles on the PHP Chinese website!