docker hello-world

docker install

Redhat & Contos: System Requirements, 64-bit Os and version 3.10
Ubuntu : System Requirements, 64-bit Os and version 3.10

Pull the image from the docker remote repository to the local, name: pull the name of the image, :tag: specify the version
docker pull [options] name[:tag]

Check which images are available on this machine
docker images [options] [repository[:tag]]

docker for mac
    https://docs.docker.com/docker-for-mac/install/

 

get mirror


xpMac:~ xupan$ docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
9bb5a5d4561a: Pull complete 
Digest: sha256:f5233545e43561214ca4891fd1157e1c3c563316ed8e237750d59bde73361e77
Status: Downloaded newer image for hello-world:latest

 

View mirror


xpMac:~ xupan$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
hello-world         latest              e38bc07ac18e        2 weeks ago         1.85kB

 

 

run


docker run [options] image[:tag][command][arg...]
docker run hello-world


xpMac:~ xupan$ docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/

 


 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325079329&siteId=291194637