Lokvin Wiki
Advertisement

docker doc

docker begin

  • install docker on mac
  • docker run hello-world
>docker run hello-world
  • docker run docker/whalesay cowsay boo
>docker run docker/whalesay cowsay boo
  • docker images - list all images on your local system
bash-3.2$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
docker-whale        latest              614b79d97fb0        7 days ago          274 MB
yren/docker-whale   latest              614b79d97fb0        7 days ago          274 MB
hello-world         latest              af340544ed62        4 weeks ago         960 B
docker/whalesay     latest              fb434121fc77        3 months ago        247 MB

write a docker file

  • mkdir mydockerbuild
$ mkdir mydockerbuild
$ cd mydockerbuild
$ touch Dockerfile
$vi Dockerfile
  • add blow content to Dockerfile
FROM docker/whalesay:latest
RUN apt-get -y update && apt-get install -y fortunes
CMD /usr/games/fortune -a | cowsay
Advertisement