Find and run the whalesay image

People all over the world create Docker images. You can find these images by browsing the Docker Hub. In this next section, you’ll search for and find the image you’ll use in the rest of this getting started.

Step 1: Locate the whalesay image

  1. Open your browser and browse to the Docker Hub.

    The Docker Hub contains images from individuals like you and official images from organizations like RedHat, IBM, Google, and a whole lot more.

  2. Click Browse & Search.

    The browser opens the search page.

  3. Enter the word whalesay in the search bar.

  4. Click on the docker/whalesay image in the results.

    The browser displays the repository for the whalesay image.

    Each image repository contains information about an image. It should include information such as what kind of software the image contains and how to use it. You may notice that the whalesay image is 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

Make sure Docker is running. On Docker for Mac and Docker for Windows, this is indicated by the Docker whale showing in the status bar.

  1. Open a command-line terminal.

  2. 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 boo
    Unable to find image 'docker/whalesay:latest' locally
    latest: Pulling from docker/whalesay
    e9e06b06e14c: Pull complete
    a82efea989f9: Pull complete
    37bea4ee0c81: Pull complete
    07f8e8c5e660: Pull complete
    676c4a1897e6: Pull complete
    5b74edbcaa5b: Pull complete
    1722f41ddcb5: Pull complete
    99da72cfe067: Pull complete
    5d5bd9951e26: Pull complete
    fb434121fc77: Already exists
    Digest: sha256:d6ee73f978a366cf97974115abe9c4099ed59c6f75c23d03c64446bb9cd49163
    Status: Downloaded newer image for docker/whalesay:latest
    _____
    < boo >
    -----
    \
    \
    \
    ## .
    ## ## ## ==
    ## ## ## ## ===
    /""""""""""""""""___/ ===
    ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
    \______ o __/
    \ \ __/
    \____\______/

    The first time you run a software image, the docker command looks for it on your local system. If the image isn’t there, then docker gets it from the hub.

  3. While still in the command line 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 images
    REPOSITORY TAG IMAGE ID CREATED SIZE
    docker/whalesay latest fb434121fc77 3 hours ago 247 MB
    hello-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 you time. 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 about that later. Let’s leave the image there for now because we are going to use it later.

  4. Take a moment to play with the whalesay container a bit.

    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 __/
    \ \ __/
    \____\______/

Find and run the whalesay image的更多相关文章

  1. Windows玩转Docker(二):运行whalesay image

    docker官网site:http://www.docker.com/ 参照site:https://docs.docker.com/windows/step_three/ docker安装参照: h ...

  2. docker 介绍

    docker 介绍 安装 sudo apt-get install docker.io sudo docker info 查看是否安装成功 hello world sodu docker run he ...

  3. 在Docker Hub上查找可用的Image映像

    任何人都可以创建Docker Image映像,你可以浏览Docker Hub来查找这些Image映像. 定位Whalesay 映像 打开你的浏览器,浏览Docker Hub: Docker Hub包含 ...

  4. Docker安装及基础使用

    Docker 安装 在 Mac OS X 系统中,首先你要下载安装包安装:Docker Toolbox 安装过程中,可以选择是否安装 Docker Machine,Docker Compose 等,默 ...

  5. Windows10下的docker安装与入门 (二)使用docker引擎在容器中运行镜像

    Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱机制,相互之间不会有任何 ...

  6. Windows10下的docker安装与入门 (三) 创建自己的docker镜像并且在容器中运行它

    Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的 Linux 机器上,也可以实现虚拟化.容器是完全使用沙箱机制,相互之间不会有任何 ...

  7. [转载]Docker 完全指南

    Docker 完全指南 原作者地址: https://wdxtub.com/2017/05/01/docker-guide/  发表于 2017-05-01 |  更新于 2017-08-03 |   ...

  8. 使用 docker 创建自己的镜像

    docker run 命令 镜像(image):An image is a filesystem and parameters to use at runtime. It doesn't have s ...

  9. docker1-安装和使用

    docker安装和使用 一.安装docker 1.1 centos7.2安装docker 环境:centos7.2 安装方法:https://docs.docker.com/engine/instal ...

随机推荐

  1. c#弱事件(weak event)

    传统事件publisher和listener是直接相连的,这样会对垃圾回收带来一些问题,例如listener已经不引用任何对象但它仍然被publisher引用 垃圾回收器就不能回收listener所占 ...

  2. [SOJ] 无路可逃?

    Description 唐僧被妖怪关在迷宫中.孙悟空好不容易找到一张迷宫地图,并通过一个魔法门来到来到迷宫某个位置.假设迷宫是一个n*m的矩阵,它有两种地形,1表示平地,0表示沼泽,孙悟空只能停留在平 ...

  3. 【Time系列二】自动关机脚本

    今天在弄那个自动关机脚本的时候,遇到最大的麻烦就是怎么像电脑一样显示关机时间,看 了其他大神的博客,明白了原来用的是我没学过的datetime模块和time.strptime模块 ! ! ! 接下来, ...

  4. C#拾遗(二、函数)

    1. 参数数组.C#的特色,允许函数参数的最后指定一个参数数组,可以使用个数不定的参数调用,用params关键字定义 static double SumVals(params double[] val ...

  5. Webdriver常用的元素定位

    Webdriver常用定位元素的方法有以下八种: id.name.class name.tag name.link text.partial link text.xpath.class selecto ...

  6. 更新BLUZ

    bluez的编译安装依赖好些软件,下面记录下,可能比较简陋. configure: error: GLib >= 2.28 is required解决方法:一般glib会被安装,主要是一些开发文 ...

  7. Sublime的Package Control的安装

    最近在用Sublime,我想很多人和我一样都是先要安装PackageControl吧! 可是看了网上的好多博客感觉都太繁琐了 对于像我这样的小白来说实在有很多看不懂的地方 相对来说还是官网的那种方法更 ...

  8. 12C RMAN 备份参考

    12C引进了pdb的概念,使得rman的恢复相对来说复杂了一些,这里对pdb的常规备份和恢复进行了简单测试,供大家参考 1.cdb启动和pdb关系测试 [oracle@xifenfei tmp]$ s ...

  9. Eclipse 打开当前文件所在的文件夹

    两种方法: 1.安装EasyExplorer插件,有了这个插件就可以很方便地打开资源文件所在的文件夹了. EasyExplorer 从 http://sourceforge.net/projects/ ...

  10. C#读取Excel的其中一种方式OleDb读取(100万条)--快速大量插入SQL中

    主要运用表类型 Create table BulkTestTable( Id nvarchar(), UserName nvarchar(), Pwd nvarchar() ) Go CREATE T ...