]> git.immae.eu Git - github/shaarli/Shaarli.git/blame - doc/md/docker/shaarli-images.md
doc: add armhf docker images
[github/shaarli/Shaarli.git] / doc / md / docker / shaarli-images.md
CommitLineData
32488257 1A brief guide on getting starting using docker is given in [Docker 101](docker-101.md).
2To learn more about user data and how to keep it across versions, please see [Upgrade and Migration](../Upgrade-and-migration.md).
3
53ed6d7d 4## Get and run a Shaarli image
5
6### DockerHub repository
7The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/)
8repository.
9
10### Available image tags
fab0f4e5
V
11- `latest`: latest branch (tarball release)
12- `master`: master branch (tarball release)
53ed6d7d 13- `stable`: stable branch (tarball release)
b7ca2eb2 14- `armhf-latest`: latest branch for ARMv7 32bit processors (tarball release)
15- `armhf-master`: master branch for ARMv7 32bit processors (tarball release)
53ed6d7d 16
fab0f4e5
V
17The `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
23The `stable` image relies on:
24
53ed6d7d 25- [Debian 8 Jessie](https://hub.docker.com/_/debian/)
26- [PHP5-FPM](http://php-fpm.org/)
27- [Nginx](http://nginx.org/)
28
b7ca2eb2 29The `armhf-*` images rely on [Linuxserver.io Alpine armhf images](https://hub.docker.com/r/lsiobase/alpine.armhf/).
fab0f4e5 30
53ed6d7d 31### Download from DockerHub
32```bash
33$ docker pull shaarli/shaarli
34latest: Pulling from shaarli/shaarli
3532716d9fcddb: Pull complete
3684899d045435: Pull complete
374b6ad7444763: Pull complete
38e0345ef7a3e0: Pull complete
395c1dd344094f: Pull complete
406422305a200b: Pull complete
417d63f861dbef: Pull complete
423eb97210645c: Pull complete
43869319d746ff: Already exists
44869319d746ff: Pulling fs layer
45902b87aaaec9: Already exists
46Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98
47Status: 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
54d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
55
56# launch the container in the background
57$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
58d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
59
60# list active containers
61$ docker ps
62CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
63d40b7af693d6 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!
69backstabbing_galileo
70
71# check the container is stopped
72$ docker ps
73CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
74
75# list ALL containers
76$ docker ps -a
77CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
78d40b7af693d6 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
82backstabbing_galileo
83
84$ docker ps -a
85CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
86```
60ca6354 87
88### Automatic builds
89
90Docker 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```
92MY_SHAARLI_VOLUME=$(cd /path/to/shaarli/data/ && pwd -P)
93docker run -ti --rm \
94 -p 8000:80 \
95 -v $MY_SHAARLI_VOLUME:/var/www/shaarli/data \
96 shaarli/shaarli
97```