]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - doc/md/docker/shaarli-images.md
doc: add armhf docker images
[github/shaarli/Shaarli.git] / doc / md / docker / shaarli-images.md
1 A brief guide on getting starting using docker is given in [Docker 101](docker-101.md).
2 To learn more about user data and how to keep it across versions, please see [Upgrade and Migration](../Upgrade-and-migration.md).
3
4 ## Get and run a Shaarli image
5
6 ### DockerHub repository
7 The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/)
8 repository.
9
10 ### Available image tags
11 - `latest`: latest branch (tarball release)
12 - `master`: master branch (tarball release)
13 - `stable`: stable branch (tarball release)
14 - `armhf-latest`: latest branch for ARMv7 32bit processors (tarball release)
15 - `armhf-master`: master branch for ARMv7 32bit processors (tarball release)
16
17 The `latest` and `master` images rely on:
18
19 - [Alpine Linux](https://www.alpinelinux.org/)
20 - [PHP7-FPM](http://php-fpm.org/)
21 - [Nginx](http://nginx.org/)
22
23 The `stable` image relies on:
24
25 - [Debian 8 Jessie](https://hub.docker.com/_/debian/)
26 - [PHP5-FPM](http://php-fpm.org/)
27 - [Nginx](http://nginx.org/)
28
29 The `armhf-*` images rely on [Linuxserver.io Alpine armhf images](https://hub.docker.com/r/lsiobase/alpine.armhf/).
30
31 ### Download from DockerHub
32 ```bash
33 $ docker pull shaarli/shaarli
34 latest: Pulling from shaarli/shaarli
35 32716d9fcddb: Pull complete
36 84899d045435: Pull complete
37 4b6ad7444763: Pull complete
38 e0345ef7a3e0: Pull complete
39 5c1dd344094f: Pull complete
40 6422305a200b: Pull complete
41 7d63f861dbef: Pull complete
42 3eb97210645c: Pull complete
43 869319d746ff: Already exists
44 869319d746ff: Pulling fs layer
45 902b87aaaec9: Already exists
46 Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
47 Status: Downloaded newer image for shaarli/shaarli:latest
48 ```
49
50 ### Create and start a new container from the image
51 ```bash
52 # map the host's :8000 port to the container's :80 port
53 $ docker create -p 8000:80 shaarli/shaarli
54 d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
55
56 # launch the container in the background
57 $ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
58 d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
59
60 # list active containers
61 $ docker ps
62 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
63 d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo
64 ```
65
66 ### Stop and destroy a container
67 ```bash
68 $ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
69 backstabbing_galileo
70
71 # check the container is stopped
72 $ docker ps
73 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
74
75 # list ALL containers
76 $ docker ps -a
77 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
78 d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo
79
80 # destroy the container
81 $ docker rm backstabbing_galileo # let's put an end to these barbarian practices
82 backstabbing_galileo
83
84 $ docker ps -a
85 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
86 ```
87
88 ### Automatic builds
89
90 Docker users can start a personal instance from an [autobuild image](https://hub.docker.com/r/shaarli/shaarli/). For example to start a temporary Shaarli at ``localhost:8000``, and keep session data (config, storage):
91 ```
92 MY_SHAARLI_VOLUME=$(cd /path/to/shaarli/data/ && pwd -P)
93 docker run -ti --rm \
94 -p 8000:80 \
95 -v $MY_SHAARLI_VOLUME:/var/www/shaarli/data \
96 shaarli/shaarli
97 ```