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. html和html5学习

    html和html5学习 chorme.safari中的input或textarea html超链接(a)详细讲解 html5新增及删除标签 html表格 图片加alt属性 input的type属性 ...

  2. jvm-监控指令-jps

    解释:jps 列表展示java进程信息,以及java进程配置的jvm参数. 命令格式: jps [ options ] [ hostid ]  选项 -m 输出main method的参数 -l 输出 ...

  3. Hiver 操作 MySQL 导致锁表

    Hadoop 搬迁到新集群后,操作主库 MySQL 导致了锁表...sad 具体锁表时间点  : 2016-1-14 14:31  到   2016-1-14 14:36 之间 在 oradba 的 ...

  4. CSS 选择器之基本选择器 属性选择器 伪类选择器

    CSS 选择器 常见的选择器列表图 CSS选择器笔记 基本选择器 通配符选择器(*) 元素选择器(E) 类选择器(.className)    所有浏览器都支持类选择器,但多类选择器(.classNa ...

  5. @Autowired注解(转)

    5.6.4 @Autowired注解 自Spring诞生以来,

  6. Deploy Django in Windows

      配置 安装目录 D:\PythonWebSW\(免安装) d:\Program Files\ (安装版) 工作目录 E:/PythonWeb/code 项目名称 voith_sales Insta ...

  7. Convert a byte[] array to readable string format. This makes the "hex" readable!

    /* * Java Bittorrent API as its name indicates is a JAVA API that implements the Bittorrent Protocol ...

  8. xss框架的一些想法

    今天pybeef作为一个课程设计答辩完成了,向老师介绍了很多xss利用相关的场景和技术. 先说一下已经实现了什么, 1, 浏览器版本的判断 这方面只能判断IE和firefox 火狐判断只判断了user ...

  9. Struts2-1.配置&与第一个应用

    配置流程 1.web项目中导入Strus2应用需要的包,复制到项目的lib文件夹下 点击此处下载需要的包,解压后复制进去即可:http://pan.baidu.com/s/1jHhjd2Y 2.编写S ...

  10. js--事件对象的理解1

    在触发DOM上的某个事件时,会产生一个事件对象event.这个对象中包含着所有与事件有关的信息.包括导致事件的元素,事件的类型以及其他与特定事件相关的信息. 举例鼠标操作导致的事件对象中,会包含鼠标位 ...