Find and run the Whalesay image (find and run Whalesay image)
People all across the world create Docker images. (People worldwide can build Docker images) You can find these images by browsing the Docker Hub. (You can look for these mirrors by browsing the Docker hub) in this next section (on the next part), you'll do just the. This getting started. (What you just need to do is to find the image to use at the beginning of the next step)
Step 1:locate The Whale (whale) say image (positioning Whalesay mirror)
Open your browser and browse to the Docker Hub.
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>The Docker Hub contains images from individual (individual, individual, individual, individual) s like you and official (official, formal) images from organizations Li Ke RedHat, IBM, Google, and a whole lot (bulk) more.
Click Browse & Search.
The browser opens the search page.
-
enter the Word whalesay
in the Search bar (bar, bar). Searching box, search bar
650) this.width=650; src=/e/u261/themes/default/images/ Spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid # DDD; "alt=" Spacer.gif "/>
Click on the Docker/whalesay image in the results.
The browser displays the repository for the Whalesay image.
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>Each image repository contains information on an image. It should include information such as what kind of software the image contains and how to use it. Notice that the Whalesay image was based on a Linux distribution called Ubuntu. In the next step, you run the Whalesay image on your machine.
Step 2:run the Whalesay image
Put your cursor (cursor, cursor) in your terminal window at the $
prompt.
Type the docker run docker/whalesay cowsay boo
command and press RETURN.
This command runs the Whalesay image in a container. Your terminal should look like the following:
$ docker run docker/whalesay cowsay boounable to find image ' Docker/whalesay:latest ' locallylatest: pulling from docker/whalesaye9e06b06e14c: pull completea82efea989f9: Pull complete37bea4ee0c81: Pull complete07f8e8c5e660: PULL&NBSP;COMPLETE676C4A1897E6:&NBSP;PULL&NBSP;COMPLETE5B74EDBCAA5B:&NBSP;PULL&NBSP;COMPLETE1722F41DDCB5: pull complete99da72cfe067: pull complete5d5bd9951e26: pull completefb434121fc77 : already existsdigest: sha256: D6ee73f978a366cf97974115abe9c4099ed59c6f75c23d03c64446bb9cd49163status: downloaded newer image for docker/whalesay:latest _____< boo > ----- \ ## .## ## ## ==## ## ## ## === /"" "" "" "" "" "" "" "___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ \______ o __/ \ \ __/ \____\_____ _/
The first time you run a software image with the docker
command looks for it on your local system. If the image isn ' t there, then docker
gets it from the hub.
While still in the terminal, type docker images
command and press RETURN.
the command lists all the images on your local system. You should See docker/whalesay
in the list.
$ docker imagesrepository tag IMAGE ID created virtual sizedocker/ whalesay latest fb434121fc77 3 hours ago 247 MBhello-world latest 91c95931e552 5 weeks ago 910 b
When you run an image in a container, Docker downloads the image to your computer. This local copy of the image saves. Docker only downloads the image again if the image's source changes on the hub. You can, of course, delete the image yourself. You'll learn more on that later. Let's leave the image there for now because we're going to use it later.
Take a moment to play with the Whalesay container a bit. (Spend a little time to play Whalesay this mirror)
Try running the whalesay
image again with a word or phrase. Try a long or short phrase. Can You break the cow?
$ docker run docker/whalesay cowsay boo-boo _________< boo-boo > --------- \ ## . ## ## ## == ## ## ## ## === /"" "" "" "" "" "" "" "___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ \______ o __/ \ \ __/ \____\______/
Where to go next
On the page, you learned to search for images on Docker Hub. You used your command line-to-run an image. You learned this running an image copies it on your computer. Now, your own Docker image for ready to create. Go on to the next part to build your own image.
Original: https://docs.docker.com/linux/step_three/
This article is from the "zcy.gy" blog, make sure to keep this source http://1064187464.blog.51cto.com/9108437/1774406
Find and run the Whalesay image