Get the containerID, docker

282 Views Asked by At

I've build a container using

$docker-compose build

How do I get the container's ID ? I tried this, but just gave me the name and not container's ID :

$docker-compose ps
1

There are 1 best solutions below

0
On BEST ANSWER

You build an image, and you run a container from an image.

Here I believe you are mixing both concepts: the output of your build command is an image (which you can see using docker images), docker ps will show you the running containers.