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. 2、表单form

    只要使用input,就用form,使用方法是在所有的input之外加一个总的form双标签 切记给每个input都加name,提交表单时同时会提交name属性 input可以做的事:文本框.密码框.单 ...

  2. C# 中获取时区列表

    c#中获取时区列表 下面方法获得的仅仅用来显示和使用,无法用来进行时间转换. public static List<DisplayTimeZone> GetSystemTimeZones( ...

  3. 利用rabbit_mq队列消息实现对一组主机进行命令下发

    目的: 利用rabbit_mq队列消息实现对一组主机进行命令下发 server: #!/usr/bin/env python3.5 # -*- coding:utf8 -*- import os,sy ...

  4. C++友元

    通过friend关键字,我们可以将不属于当前类的一个函数在当前类中加以声明,该函数便可以成为当前类的友元函数. 例1: #include<iostream>using namespace ...

  5. mac上设置sudo不要密码

    觉得每次sudo都需要设置密码太过麻烦,于是折腾了一番,谁知走了一番弯路记录下来. 以下是网上找到的步骤 chmod u+w /etc/sudoers  给当前用户增加写权限 vi /etc/sudo ...

  6. NYOJ-102 次方求模

    次方求模 时间限制:1000 ms  |  内存限制:65535 KB 难度:3   描述 求a的b次方对c取余的值   输入 第一行输入一个整数n表示测试数据的组数(n<100)每组测试只有一 ...

  7. Angular之Providers (Value, Factory, Service and Constant )

    官方文档Providers Each web application you build is composed of objects that collaborate to get stuff do ...

  8. SPA UI-router

    ------------------------------------------------------------------------------------ SPA SPA(单页面应用): ...

  9. mac 配置快捷键快速锁屏

    mac下锁屏方式有很多: 快捷键control+shift+power 在其他中打开钥匙串访问,讲屏幕锁定按钮显示在menu bar中 这两种方法存在弊端: 按三个键去锁定屏幕太费劲,况且让使用外接键 ...

  10. activity 嵌套一级fragment,一级fragment嵌套二级fragment,在一级fragment中刷新二级fragment中的UI

    今天遇到挺纠结的问题,由于产品设计的问题,技术上涉及到activity 嵌套一级fragment,一级fragment嵌套二级fragment,在一级fragment中刷新二级fragment中的UI ...