2 - [Docker usage](#docker-usage)[](.html)
3 - [Get and run a Shaarli image](#get-and-run-a-shaarli-image)[](.html)
4 - [Resources](#resources)[](.html)
8 Install [Docker](https://www.docker.com/), by following the instructions relevant[](.html)
9 to your OS / distribution, and start the service.
11 #### Search an image on [DockerHub](https://hub.docker.com/)[](.html)
14 $ docker search debian
16 NAME DESCRIPTION STARS OFFICIAL AUTOMATED
17 ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK][](.html)
18 debian Debian is a Linux distribution that's comp... 603 [OK][](.html)
19 google/debian 47 [OK][](.html)
22 #### Show available tags for a repository
24 $ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool
26 % Total % Received % Xferd Average Speed Time Time Time Current
27 Dload Upload Total Spent Left Speed
28 100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433
52 "name": "wheezy-backports"
58 #### Pull an image from DockerHub
60 $ docker pull repository[:tag][](.html)
62 $ docker pull debian:wheezy
63 wheezy: Pulling from debian
64 4c8cbfd2973e: Pull complete
65 60c52dbe9d91: Pull complete
66 Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe
67 Status: Downloaded newer image for debian:wheezy
70 ## Get and run a Shaarli image
71 ### DockerHub repository
72 The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/)[](.html)
75 ### Available image tags
76 - `latest`: master branch (tarball release)
77 - `stable`: stable branch (tarball release)
78 - `dev`: master branch (Git clone)
81 - [Debian 8 Jessie](https://hub.docker.com/_/debian/)[](.html)
82 - [PHP5-FPM](http://php-fpm.org/)[](.html)
83 - [Nginx](http://nginx.org/)[](.html)
85 ### Download from DockerHub
87 $ docker pull shaarli/shaarli
88 latest: Pulling from shaarli/shaarli
89 32716d9fcddb: Pull complete
90 84899d045435: Pull complete
91 4b6ad7444763: Pull complete
92 e0345ef7a3e0: Pull complete
93 5c1dd344094f: Pull complete
94 6422305a200b: Pull complete
95 7d63f861dbef: Pull complete
96 3eb97210645c: Pull complete
97 869319d746ff: Already exists
98 869319d746ff: Pulling fs layer
99 902b87aaaec9: Already exists
100 Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
101 Status: Downloaded newer image for shaarli/shaarli:latest
104 ### Create and start a new container from the image
106 # map the host's :8000 port to the container's :80 port
107 $ docker create -p 8000:80 shaarli/shaarli
108 d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
110 # launch the container in the background
111 $ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
112 d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
114 # list active containers
116 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
117 d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
120 ### Stop and destroy a container
122 $ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
125 # check the container is stopped
127 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
129 # list ALL containers
131 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
132 d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
134 # destroy the container
135 $ docker rm backstabbing_galileo # let's put an end to these barbarian practices
139 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
144 - [Interactive Docker training portal](https://www.katacoda.com/courses/docker/) on [Katakoda](https://www.katacoda.com/)[](.html)
145 - [Where are Docker images stored?](http://blog.thoward37.me/articles/where-are-docker-images-stored/)[](.html)
146 - [Dockerfile reference](https://docs.docker.com/reference/builder/)[](.html)
147 - [Dockerfile best practices](https://docs.docker.com/articles/dockerfile_best-practices/)[](.html)
148 - [Volumes](https://docs.docker.com/userguide/dockervolumes/)[](.html)
151 - [Repositories](https://docs.docker.com/userguide/dockerrepos/)[](.html)
152 - [Teams and organizations](https://docs.docker.com/docker-hub/orgs/)[](.html)
153 - [GitHub automated build](https://docs.docker.com/docker-hub/github/)[](.html)
155 ### Service management
156 - [Using supervisord](https://docs.docker.com/articles/using_supervisord/)[](.html)
157 - [Nginx in the foreground](http://nginx.org/en/docs/ngx_core_module.html#daemon)[](.html)
158 - [supervisord](http://supervisord.org/)[](.html)