I can't find my Docker image after building it

2019-02-13 01:37发布

I'm new to Docker, so please allow me to describe the steps that I did. I'm using Docker (not Docker toolbox) on OS X. I built the image from Dockerfile using the following command
sudo docker build -t myImage .

Docker confirmed that building was successful.
Successfully built 7240e.....

However, I can't find the image anywhere. I looked at this question, but the answer is for Docker toolbox, and I don't have a folder /Users/<username>/.docker as suggested by the accepted answer.

标签: macos docker
4条回答
叼着烟拽天下
2楼-- · 2019-02-13 02:21

Command to list the docker images is :

docker images

The default docker images will show all top level images, their repository and tags, and their size. An image will be listed more than once if it has multiple repository names or tags.

Click here for the screenshot for more details

查看更多
看我几分像从前
3楼-- · 2019-02-13 02:22

You would be able to see your docker images by the below command:

docker images

And to check which all containers are running in docker:

docker ps -a
查看更多
时光不老,我们不散
4楼-- · 2019-02-13 02:22

In addition to the correct responses above that discuss how to access your container or container image, if you want to know how the image is written to disk...

Docker uses a Copy on Write File System (https://en.wikipedia.org/wiki/Copy-on-write) and stores each Docker image as a series of read only layers and stores them in a list. The link below does a good job explaining how the image layers are actually stored on disk.

https://docs.docker.com/storage/storagedriver/

查看更多
乱世女痞
5楼-- · 2019-02-13 02:34

To get list of Images

docker image ls

or

docker images

查看更多
登录 后发表回答