]>
Commit | Line | Data |
---|---|---|
53ed6d7d | 1 | ## Get and run a Shaarli image |
2 | ||
3 | ### DockerHub repository | |
4 | The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/) | |
5 | repository. | |
6 | ||
7 | ### Available image tags | |
fab0f4e5 V |
8 | - `latest`: latest branch (tarball release) |
9 | - `master`: master branch (tarball release) | |
53ed6d7d | 10 | - `stable`: stable branch (tarball release) |
53ed6d7d | 11 | |
fab0f4e5 V |
12 | The `latest` and `master` images rely on: |
13 | ||
14 | - [Alpine Linux](https://www.alpinelinux.org/) | |
15 | - [PHP7-FPM](http://php-fpm.org/) | |
16 | - [Nginx](http://nginx.org/) | |
17 | ||
18 | The `stable` image relies on: | |
19 | ||
53ed6d7d | 20 | - [Debian 8 Jessie](https://hub.docker.com/_/debian/) |
21 | - [PHP5-FPM](http://php-fpm.org/) | |
22 | - [Nginx](http://nginx.org/) | |
23 | ||
fab0f4e5 | 24 | |
53ed6d7d | 25 | ### Download from DockerHub |
26 | ```bash | |
27 | $ docker pull shaarli/shaarli | |
28 | latest: Pulling from shaarli/shaarli | |
29 | 32716d9fcddb: Pull complete | |
30 | 84899d045435: Pull complete | |
31 | 4b6ad7444763: Pull complete | |
32 | e0345ef7a3e0: Pull complete | |
33 | 5c1dd344094f: Pull complete | |
34 | 6422305a200b: Pull complete | |
35 | 7d63f861dbef: Pull complete | |
36 | 3eb97210645c: Pull complete | |
37 | 869319d746ff: Already exists | |
38 | 869319d746ff: Pulling fs layer | |
39 | 902b87aaaec9: Already exists | |
40 | Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98 | |
41 | Status: Downloaded newer image for shaarli/shaarli:latest | |
42 | ``` | |
43 | ||
44 | ### Create and start a new container from the image | |
45 | ```bash | |
46 | # map the host's :8000 port to the container's :80 port | |
47 | $ docker create -p 8000:80 shaarli/shaarli | |
48 | d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101 | |
49 | ||
50 | # launch the container in the background | |
51 | $ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101 | |
52 | d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101 | |
53 | ||
54 | # list active containers | |
55 | $ docker ps | |
56 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
57 | d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo | |
58 | ``` | |
59 | ||
60 | ### Stop and destroy a container | |
61 | ```bash | |
62 | $ docker stop backstabbing_galileo # those docker guys are really rude to physicists! | |
63 | backstabbing_galileo | |
64 | ||
65 | # check the container is stopped | |
66 | $ docker ps | |
67 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
68 | ||
69 | # list ALL containers | |
70 | $ docker ps -a | |
71 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
72 | d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo | |
73 | ||
74 | # destroy the container | |
75 | $ docker rm backstabbing_galileo # let's put an end to these barbarian practices | |
76 | backstabbing_galileo | |
77 | ||
78 | $ docker ps -a | |
79 | CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
80 | ``` |