Public Repository

Last pushed: 2 years ago
Short Description
An image for use in the Docker demo tutorial
Full Description

Whalesay contains an adaption of the Linux cowsay game. The game was originally written in 1999 by Tony Monroe.
The cowsay code in this image has three modifications:

  • the default.cow is now a Docker whale
  • a docker.cow was added
  • a modification to the install.sh to disable interactive feature
    -This image is used by the Docker demo tutorial purely as a teaching tool.

How to use this image

$ docker run docker/whalesay cowsay boo
     _____ 
    < boo >
     ----- 
            \
             \
                \     
                                            ##        .            
                                ## ## ##       ==            
                         ## ## ## ##      ===            
                 /""""""""""""""""___/ ===        
        ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~   
                 \______ o          __/            
                    \    \        __/             
                        \____\______/

Dockerfile

FROM ubuntu:14.04

# install cowsay, and move the "default.cow" out of the way so we can overwrite it with "docker.cow"
RUN apt-get update && apt-get install -y cowsay --no-install-recommends && rm -rf /var/lib/apt/lists/* \
    && mv /usr/share/cowsay/cows/default.cow /usr/share/cowsay/cows/orig-default.cow

# "cowsay" installs to /usr/games
ENV PATH $PATH:/usr/games

COPY docker.cow /usr/share/cowsay/cows/
RUN ln -sv /usr/share/cowsay/cows/docker.cow /usr/share/cowsay/cows/default.cow

CMD ["cowsay"]
Docker Pull Command
Owner
docker

Comments (81)
quaddo
4 months ago

@schaynika, you're using a command which has characters which are being interpreted by your shell. This has very little to do with docker.

Try using single quotes around the string, like this:

$ docker run docker/whalesay cowsay 'chaynika*^!"'
 ______________
< chaynika*^!" >
 --------------
    \
     \
      \
                    ##        .
              ## ## ##       ==
           ## ## ## ##      ===
       /""""""""""""""""___/ ===
  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~
       \______ o          __/
        \    \        __/
          \____\______/
nyarnon
4 months ago

write pipe: bad file descriptor
Not that it matters. i368. And the whole image is bloated anyway. <G> busybox?? alpine?? something like that??

tt5753
4 months ago

https://docs.docker.com/engine/getstarted/step_four/
Just for fun, run it again.
The whale is now a lot smarter.
It comes up with its own thoughts and it takes less typing to run.

tt5753
4 months ago

This program displays the final argument in the upper left corner of the result.

tt5753
4 months ago

Try running the whalesay image again with a word or phrase. Try a long or short phrase. Can you break the cow?

dnsn
4 months ago

schaynika: That's likely the shell you run the docker command from, not the shell inside the image.

201sandeep
4 months ago

nice one

schaynika
4 months ago

Code can be easily broken by passing regular expression to the string instead of simple strings like "boo" or "boo-boo".
Eg:
bash-3.2$ docker run docker/whalesay cowsay chaynika*^!"
bash: !": event not found

yaochong
5 months ago

我没有看出来这是一个游戏, 充其量只是一个显示 由字符组成图案的脚本?

coolbits
5 months ago


< Downloading... fat whale >

    \   ^__^
     \  (oo)\_______
        (__)\       )\/\
            ||----w |
            ||     ||