How to check the created container ID in docker

Release: 2020-03-24 13:58:30
Original
17202 people have browsed it

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]#
Copy after login

Method 2:

# docker inspect --format="{{.Id}}"  test2
0f0b77cd0c53e82193c5e2e9b18d1e18a0d4dc77094284f0f6761cff76925eb2
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!