1

docker commands

I used docker ps/docker ps -a/docker ps -n 1 all not showing my first image. But it after I using docker pull hello-world it saying it installed successfully

Mureinik
  • 297,002
  • 52
  • 306
  • 350
yuan gao
  • 13
  • 2

2 Answers2

3

docker pull pulls an image (and all the layers that make it up) to your local machine, but doesn't run anything.

docker ps lists containers on your system.

Once you run that container (using docker run hello-world), you'll see it in dokcer ps. To view the image you pulled, you could use docker images.

Mureinik
  • 297,002
  • 52
  • 306
  • 350
1

As you find from the previous answer docker pull will download the image (mostly from the docker hub) and when trying to pull next time, it finds the image already in your local machine. To see all the images you have locally, use docker image ls.

hafij
  • 208
  • 2
  • 10