测试运行hello-world
docker run hello-world
----------------------------------------------------------------------------
docker run : to run a new container
docker ps : to see running and stopped containers
docker images : to see info about images
docker info
一个容器,一个镜像
一个容器: "/hello"
一个镜像: hello-world
--------------------------------------------------------
Theory of Pulling and Running Containers
- Installing Docker gives you the client and daemon
- Client makes API calls to daemon
- Daemon implements the Docker Remote API
- docker run : starts a new container
- Docker Hub is the default public registry
- The daemon will pull images that it doesn't already have
--------------------------------------------------------------
Working with images
Containers and Images
Images ~ Stopped containers
Containers ~ Running Images
-----------------------------------------------------------------
Downloaded newer image for alpine:latest
Downloaded newer image for ubuntu:latest
----------------------------------------------------------
移除镜像
docker rmi alpine
------------------------------------------------------------
docker images: 查到3个镜像
docker ps -a: 查到2个容器
docker info
-----------------------------------------