Docker Community Forums

Share and learn in the Docker community.

Docker ps doubts

Sorry for English “google translate”

When I run command:

docker ps | grep <container_name>

Returns all information about that container

But the first information of the line is the container ID.

How can I get only container ID by specific container name?

Hi :slight_smile:

docker ps -qf "name=CONTAINERNAME"

-q = only container ID
-f = filter

1 Like

It,s work!!!

Thank you so much.