1 ## Get and run a Shaarli image
3 ### DockerHub repository
4 The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/)
7 ### Available image tags
8 - `latest`: master branch (tarball release)
9 - `stable`: stable branch (tarball release)
12 - [Debian 8 Jessie](https://hub.docker.com/_/debian/)
13 - [PHP5-FPM](http://php-fpm.org/)
14 - [Nginx](http://nginx.org/)
16 ### Download from DockerHub
18 $ docker pull shaarli/shaarli
19 latest: Pulling from shaarli/shaarli
20 32716d9fcddb: Pull complete
21 84899d045435: Pull complete
22 4b6ad7444763: Pull complete
23 e0345ef7a3e0: Pull complete
24 5c1dd344094f: Pull complete
25 6422305a200b: Pull complete
26 7d63f861dbef: Pull complete
27 3eb97210645c: Pull complete
28 869319d746ff: Already exists
29 869319d746ff: Pulling fs layer
30 902b87aaaec9: Already exists
31 Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
32 Status: Downloaded newer image for shaarli/shaarli:latest
35 ### Create and start a new container from the image
37 # map the host's :8000 port to the container's :80 port
38 $ docker create -p 8000:80 shaarli/shaarli
39 d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
41 # launch the container in the background
42 $ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
43 d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
45 # list active containers
47 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
48 d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
51 ### Stop and destroy a container
53 $ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
56 # check the container is stopped
58 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
62 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
63 d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
65 # destroy the container
66 $ docker rm backstabbing_galileo # let's put an end to these barbarian practices
70 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES