From 84d0632a2df1cf833610bc8dd45d4808e4a8dc0e Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Sat, 29 Jul 2017 15:26:27 +0200 Subject: docker: remove `dev` image, update documentation Relates to https://github.com/shaarli/Shaarli/issues/843 Changed: - Update Docker image list - Update Docker documentation structure Removed: - Delete Dockerfile and resources for the `dev` image - Cleanup `doc/` resources Signed-off-by: VirtualTam --- doc/md/docker/docker-101.md | 62 ++++++++++++++++++++++++ doc/md/docker/resources.md | 19 ++++++++ doc/md/docker/reverse-proxy-configuration.md | 6 +++ doc/md/docker/shaarli-images.md | 71 ++++++++++++++++++++++++++++ 4 files changed, 158 insertions(+) create mode 100644 doc/md/docker/docker-101.md create mode 100644 doc/md/docker/resources.md create mode 100644 doc/md/docker/reverse-proxy-configuration.md create mode 100644 doc/md/docker/shaarli-images.md (limited to 'doc/md/docker') diff --git a/doc/md/docker/docker-101.md b/doc/md/docker/docker-101.md new file mode 100644 index 00000000..b02dd149 --- /dev/null +++ b/doc/md/docker/docker-101.md @@ -0,0 +1,62 @@ +## Basics +Install [Docker](https://www.docker.com/), by following the instructions relevant +to your OS / distribution, and start the service. + +### Search an image on [DockerHub](https://hub.docker.com/) + +```bash +$ docker search debian + +NAME DESCRIPTION STARS OFFICIAL AUTOMATED +ubuntu Ubuntu is a Debian-based Linux operating s... 2065 [OK] +debian Debian is a Linux distribution that's comp... 603 [OK] +google/debian 47 [OK] +``` + +### Show available tags for a repository +```bash +$ curl https://index.docker.io/v1/repositories/debian/tags | python -m json.tool + +% Total % Received % Xferd Average Speed Time Time Time Current +Dload Upload Total Spent Left Speed +100 1283 0 1283 0 0 433 0 --:--:-- 0:00:02 --:--:-- 433 +``` + +Sample output: +```json +[ + { + "layer": "85a02782", + "name": "stretch" + }, + { + "layer": "59abecbc", + "name": "testing" + }, + { + "layer": "bf0fd686", + "name": "unstable" + }, + { + "layer": "60c52dbe", + "name": "wheezy" + }, + { + "layer": "c5b806fe", + "name": "wheezy-backports" + } +] + +``` + +### Pull an image from DockerHub +```bash +$ docker pull repository[:tag] + +$ docker pull debian:wheezy +wheezy: Pulling from debian +4c8cbfd2973e: Pull complete +60c52dbe9d91: Pull complete +Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe +Status: Downloaded newer image for debian:wheezy +``` diff --git a/doc/md/docker/resources.md b/doc/md/docker/resources.md new file mode 100644 index 00000000..082d4a46 --- /dev/null +++ b/doc/md/docker/resources.md @@ -0,0 +1,19 @@ +### Docker + +- [Interactive Docker training portal](https://www.katacoda.com/courses/docker/) on [Katakoda](https://www.katacoda.com/) +- [Where are Docker images stored?](http://blog.thoward37.me/articles/where-are-docker-images-stored/) +- [Dockerfile reference](https://docs.docker.com/reference/builder/) +- [Dockerfile best practices](https://docs.docker.com/articles/dockerfile_best-practices/) +- [Volumes](https://docs.docker.com/userguide/dockervolumes/) + +### DockerHub + +- [Repositories](https://docs.docker.com/userguide/dockerrepos/) +- [Teams and organizations](https://docs.docker.com/docker-hub/orgs/) +- [GitHub automated build](https://docs.docker.com/docker-hub/github/) + +### Service management + +- [Using supervisord](https://docs.docker.com/articles/using_supervisord/) +- [Nginx in the foreground](http://nginx.org/en/docs/ngx_core_module.html#daemon) +- [supervisord](http://supervisord.org/) diff --git a/doc/md/docker/reverse-proxy-configuration.md b/doc/md/docker/reverse-proxy-configuration.md new file mode 100644 index 00000000..91ffecff --- /dev/null +++ b/doc/md/docker/reverse-proxy-configuration.md @@ -0,0 +1,6 @@ + +TODO, see https://github.com/shaarli/Shaarli/issues/888 + +## HAProxy + +## Nginx diff --git a/doc/md/docker/shaarli-images.md b/doc/md/docker/shaarli-images.md new file mode 100644 index 00000000..6d108d21 --- /dev/null +++ b/doc/md/docker/shaarli-images.md @@ -0,0 +1,71 @@ +## Get and run a Shaarli image + +### DockerHub repository +The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaarli/shaarli/) +repository. + +### Available image tags +- `latest`: master branch (tarball release) +- `stable`: stable branch (tarball release) + +All images rely on: +- [Debian 8 Jessie](https://hub.docker.com/_/debian/) +- [PHP5-FPM](http://php-fpm.org/) +- [Nginx](http://nginx.org/) + +### Download from DockerHub +```bash +$ docker pull shaarli/shaarli +latest: Pulling from shaarli/shaarli +32716d9fcddb: Pull complete +84899d045435: Pull complete +4b6ad7444763: Pull complete +e0345ef7a3e0: Pull complete +5c1dd344094f: Pull complete +6422305a200b: Pull complete +7d63f861dbef: Pull complete +3eb97210645c: Pull complete +869319d746ff: Already exists +869319d746ff: Pulling fs layer +902b87aaaec9: Already exists +Digest: sha256:f836b4627b958b3f83f59c332f22f02fcd495ace3056f2be2c4912bd8704cc98 +Status: Downloaded newer image for shaarli/shaarli:latest +``` + +### Create and start a new container from the image +```bash +# map the host's :8000 port to the container's :80 port +$ docker create -p 8000:80 shaarli/shaarli +d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101 + +# launch the container in the background +$ docker start d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101 +d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101 + +# list active containers +$ docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds 0.0.0.0:8000->80/tcp backstabbing_galileo +``` + +### Stop and destroy a container +```bash +$ docker stop backstabbing_galileo # those docker guys are really rude to physicists! +backstabbing_galileo + +# check the container is stopped +$ docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + +# list ALL containers +$ docker ps -a +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 5 minutes ago Exited (0) 48 seconds ago backstabbing_galileo + +# destroy the container +$ docker rm backstabbing_galileo # let's put an end to these barbarian practices +backstabbing_galileo + +$ docker ps -a +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +``` -- cgit v1.2.3 From 22a30602cb31f9b1e36aabae4259561625b7ffe3 Mon Sep 17 00:00:00 2001 From: "B. van Berkum" Date: Tue, 3 Oct 2017 00:24:23 +0200 Subject: Docker 101: container start and cleanup --- doc/md/docker/docker-101.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'doc/md/docker') diff --git a/doc/md/docker/docker-101.md b/doc/md/docker/docker-101.md index b02dd149..d12a1324 100644 --- a/doc/md/docker/docker-101.md +++ b/doc/md/docker/docker-101.md @@ -60,3 +60,40 @@ wheezy: Pulling from debian Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe Status: Downloaded newer image for debian:wheezy ``` + +Docker re-uses layers already downloaded. Iow. if you have only images based on some Alpine or Ubuntu version for example, those can share disk space. + +### Start a container +A container is an instance created from an image, that can be run and that keeps running until its main process exits. Or until the user stops the container. + +The simplest way to start a container from image is ``docker run``. It also pulls the image for you if it is not locally available. For more advanced use, refer to ``docker create``. + +Note that stopped containers are not destroyed, unless you specify ``--rm``. +To view all created, running and stopped containers, enter: + +```bash +$ docker ps -a +``` + +Some containers may be designed or configured to be restarted, others are not. Note that both network ports and volumes of a container are created on start, and not editable later. + +### Access a running container +A running container is accessible using ``docker exec``, or ``docker copy``. +You can use ``exec`` to start a root shell in the Shaarli container: +```bash +$ docker exec -ti bash +``` +Note the names and ID's of containers are list in ``docker ps``. You an even type only one or two letters of the ID, given they are unique. + +Access can also be through one or more network ports, or disk volumes. Both are specified on and fixed on ``docker create`` or ``run``. + +### Docker disk use +Trying out different images can fill some gigabytes of disk quickly. Besides images, the docker volumes usually take up most disk space. + +If you care only about trying out docker and not about what is running or saved, +the following commands should help you out quickly: + +```bash +$ docker rmi -f $(docker images -aq) # remove or mark all images for disposal +$ docker volume rm $(docker volume ls -q) # remove all volumes +``` -- cgit v1.2.3 From 60ed9b8f4142e99114661b5b8a5562aa75bffb48 Mon Sep 17 00:00:00 2001 From: "B. van Berkum" Date: Tue, 3 Oct 2017 00:33:39 +0200 Subject: Typo's, unified structure a bit. - Fixes inevitable typo that crept in. - Removed some blank lines, newlines, to match established whitespace use better. - Minor grammar improvement. --- doc/md/docker/docker-101.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'doc/md/docker') diff --git a/doc/md/docker/docker-101.md b/doc/md/docker/docker-101.md index d12a1324..271dcd5b 100644 --- a/doc/md/docker/docker-101.md +++ b/doc/md/docker/docker-101.md @@ -61,16 +61,14 @@ Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe Status: Downloaded newer image for debian:wheezy ``` -Docker re-uses layers already downloaded. Iow. if you have only images based on some Alpine or Ubuntu version for example, those can share disk space. +Docker re-uses layers already downloaded. Iow. if you have images based only Alpine or some Ubuntu version for example, those can share disk space. ### Start a container A container is an instance created from an image, that can be run and that keeps running until its main process exits. Or until the user stops the container. The simplest way to start a container from image is ``docker run``. It also pulls the image for you if it is not locally available. For more advanced use, refer to ``docker create``. -Note that stopped containers are not destroyed, unless you specify ``--rm``. -To view all created, running and stopped containers, enter: - +Note that stopped containers are not destroyed, unless you specify ``--rm``. To view all created, running and stopped containers, enter: ```bash $ docker ps -a ``` @@ -78,8 +76,7 @@ $ docker ps -a Some containers may be designed or configured to be restarted, others are not. Note that both network ports and volumes of a container are created on start, and not editable later. ### Access a running container -A running container is accessible using ``docker exec``, or ``docker copy``. -You can use ``exec`` to start a root shell in the Shaarli container: +A running container is accessible using ``docker exec``, or ``docker copy``. You can use ``exec`` to start a root shell in the Shaarli container: ```bash $ docker exec -ti bash ``` @@ -90,8 +87,7 @@ Access can also be through one or more network ports, or disk volumes. Both are ### Docker disk use Trying out different images can fill some gigabytes of disk quickly. Besides images, the docker volumes usually take up most disk space. -If you care only about trying out docker and not about what is running or saved, -the following commands should help you out quickly: +If you care only about trying out docker and not about what is running or saved, the following commands should help you out quickly: ```bash $ docker rmi -f $(docker images -aq) # remove or mark all images for disposal -- cgit v1.2.3 From 62a8b0ff6eafddcd091e3f6676b258f44b5f9e5c Mon Sep 17 00:00:00 2001 From: "B. van Berkum" Date: Tue, 3 Oct 2017 00:57:46 +0200 Subject: Docker-101: added working systemd config example --- doc/md/docker/docker-101.md | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'doc/md/docker') diff --git a/doc/md/docker/docker-101.md b/doc/md/docker/docker-101.md index 271dcd5b..35a68774 100644 --- a/doc/md/docker/docker-101.md +++ b/doc/md/docker/docker-101.md @@ -84,6 +84,11 @@ Note the names and ID's of containers are list in ``docker ps``. You an even typ Access can also be through one or more network ports, or disk volumes. Both are specified on and fixed on ``docker create`` or ``run``. +You can view the console output of the main container process too: +```bash +$ docker logs -f +``` + ### Docker disk use Trying out different images can fill some gigabytes of disk quickly. Besides images, the docker volumes usually take up most disk space. @@ -93,3 +98,45 @@ If you care only about trying out docker and not about what is running or saved, $ docker rmi -f $(docker images -aq) # remove or mark all images for disposal $ docker volume rm $(docker volume ls -q) # remove all volumes ``` + +### SystemD config +Systemd is the process manager of choice on ubuntu. Once you have a ``docker`` service installed, you can add use the following steps to set up Shaarli to run on system start. + +```bash +systemctl enable /etc/systemd/system/docker.shaarli.service +systemctl start docker.shaarli +systemctl status docker.* +journalctl -f # inspect system log if needed +``` + +You will need sudo or a root terminal to perform some or all of the steps above. Here are the contents for the service file: +``` +[Unit] +Description=Shaarli Bookmark Manager Container +After=docker.service +Requires=docker.service + + +[Service] +Restart=always + +# Put any environment you want in here, like $host- or $domainname in this example +EnvironmentFile=/etc/sysconfig/box-environment + +# It's just an example.. +ExecStart=/usr/bin/docker run \ + -p 28010:80 \ + --name ${hostname}-shaarli \ + --hostname shaarli.${domainname} \ + \ + -v /srv/docker-volumes-local/shaarli-data:/var/www/shaarli/data:rw \ + -v /etc/localtime:/etc/localtime:ro \ + \ + shaarli/shaarli:latest + +ExecStop=/usr/bin/docker rm -f ${hostname}-shaarli + + +[Install] +WantedBy=multi-user.target +``` -- cgit v1.2.3 From df8becac4fc810d78917a9896dc72a1f7b336fb9 Mon Sep 17 00:00:00 2001 From: "B. van Berkum" Date: Fri, 6 Oct 2017 00:25:50 +0200 Subject: Minor docker-101 doc updates, typos fixed #983 --- doc/md/docker/docker-101.md | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'doc/md/docker') diff --git a/doc/md/docker/docker-101.md b/doc/md/docker/docker-101.md index 35a68774..a9c00b85 100644 --- a/doc/md/docker/docker-101.md +++ b/doc/md/docker/docker-101.md @@ -61,26 +61,26 @@ Digest: sha256:c584131da2ac1948aa3e66468a4424b6aea2f33acba7cec0b631bdb56254c4fe Status: Downloaded newer image for debian:wheezy ``` -Docker re-uses layers already downloaded. Iow. if you have images based only Alpine or some Ubuntu version for example, those can share disk space. +Docker re-uses layers already downloaded. In other words if you have images based on Alpine or some Ubuntu version for example, those can share disk space. ### Start a container A container is an instance created from an image, that can be run and that keeps running until its main process exits. Or until the user stops the container. The simplest way to start a container from image is ``docker run``. It also pulls the image for you if it is not locally available. For more advanced use, refer to ``docker create``. -Note that stopped containers are not destroyed, unless you specify ``--rm``. To view all created, running and stopped containers, enter: +Stopped containers are not destroyed, unless you specify ``--rm``. To view all created, running and stopped containers, enter: ```bash $ docker ps -a ``` -Some containers may be designed or configured to be restarted, others are not. Note that both network ports and volumes of a container are created on start, and not editable later. +Some containers may be designed or configured to be restarted, others are not. Also remember both network ports and volumes of a container are created on start, and not editable later. ### Access a running container A running container is accessible using ``docker exec``, or ``docker copy``. You can use ``exec`` to start a root shell in the Shaarli container: ```bash $ docker exec -ti bash ``` -Note the names and ID's of containers are list in ``docker ps``. You an even type only one or two letters of the ID, given they are unique. +Note the names and ID's of containers are listed in ``docker ps``. You can even type only one or two letters of the ID, given they are unique. Access can also be through one or more network ports, or disk volumes. Both are specified on and fixed on ``docker create`` or ``run``. @@ -92,15 +92,15 @@ $ docker logs -f ### Docker disk use Trying out different images can fill some gigabytes of disk quickly. Besides images, the docker volumes usually take up most disk space. -If you care only about trying out docker and not about what is running or saved, the following commands should help you out quickly: +If you care only about trying out docker and not about what is running or saved, the following commands should help you out quickly if you run low on disk space: ```bash $ docker rmi -f $(docker images -aq) # remove or mark all images for disposal $ docker volume rm $(docker volume ls -q) # remove all volumes ``` -### SystemD config -Systemd is the process manager of choice on ubuntu. Once you have a ``docker`` service installed, you can add use the following steps to set up Shaarli to run on system start. +### Systemd config +Systemd is the process manager of choice on Debian-based distributions. Once you have a ``docker`` service installed, you can use the following steps to set up Shaarli to run on system start. ```bash systemctl enable /etc/systemd/system/docker.shaarli.service @@ -120,7 +120,7 @@ Requires=docker.service [Service] Restart=always -# Put any environment you want in here, like $host- or $domainname in this example +# Put any environment you want in an included file, like $host- or $domainname in this example EnvironmentFile=/etc/sysconfig/box-environment # It's just an example.. @@ -128,11 +128,9 @@ ExecStart=/usr/bin/docker run \ -p 28010:80 \ --name ${hostname}-shaarli \ --hostname shaarli.${domainname} \ - \ -v /srv/docker-volumes-local/shaarli-data:/var/www/shaarli/data:rw \ -v /etc/localtime:/etc/localtime:ro \ - \ - shaarli/shaarli:latest + shaarli/shaarli:latest ExecStop=/usr/bin/docker rm -f ${hostname}-shaarli -- cgit v1.2.3 From fab0f4e5766d519a37b497927812c6b5b38e51ed Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Sat, 21 Oct 2017 18:15:52 +0200 Subject: docker: add 'latest' image This implies the following changes: - `shaarli/shaarli:latest` will now point to the `latest` release - `shaarli/shaarli:master` will point to the `master` branch Signed-off-by: VirtualTam --- doc/md/docker/shaarli-images.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'doc/md/docker') diff --git a/doc/md/docker/shaarli-images.md b/doc/md/docker/shaarli-images.md index 6d108d21..1d19510a 100644 --- a/doc/md/docker/shaarli-images.md +++ b/doc/md/docker/shaarli-images.md @@ -5,14 +5,23 @@ The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaa repository. ### Available image tags -- `latest`: master branch (tarball release) +- `latest`: latest branch (tarball release) +- `master`: master branch (tarball release) - `stable`: stable branch (tarball release) -All images rely on: +The `latest` and `master` images rely on: + +- [Alpine Linux](https://www.alpinelinux.org/) +- [PHP7-FPM](http://php-fpm.org/) +- [Nginx](http://nginx.org/) + +The `stable` image relies on: + - [Debian 8 Jessie](https://hub.docker.com/_/debian/) - [PHP5-FPM](http://php-fpm.org/) - [Nginx](http://nginx.org/) + ### Download from DockerHub ```bash $ docker pull shaarli/shaarli -- cgit v1.2.3 From 1a2c5ddeb5587da6abc6c335e27f46a00e52c3d3 Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Sun, 22 Oct 2017 14:08:05 +0200 Subject: Documentation: add reverse proxy examples for Docker images Closes https://github.com/shaarli/Shaarli/issues/888 Signed-off-by: VirtualTam --- doc/md/docker/reverse-proxy-configuration.md | 116 ++++++++++++++++++++++++++- 1 file changed, 115 insertions(+), 1 deletion(-) (limited to 'doc/md/docker') diff --git a/doc/md/docker/reverse-proxy-configuration.md b/doc/md/docker/reverse-proxy-configuration.md index 91ffecff..6066140e 100644 --- a/doc/md/docker/reverse-proxy-configuration.md +++ b/doc/md/docker/reverse-proxy-configuration.md @@ -1,6 +1,120 @@ +## Foreword + +This guide assumes that: + +- Shaarli runs in a Docker container +- The host's `10080` port is mapped to the container's `80` port +- Shaarli's Fully Qualified Domain Name (FQDN) is `shaarli.domain.tld` +- HTTP traffic is redirected to HTTPS + +## Apache + +- [Apache 2.4 documentation](https://httpd.apache.org/docs/2.4/) + - [mod_proxy](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html) + - [Reverse Proxy Request Headers](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers) + +The following HTTP headers are set by using the `ProxyPass` directive: + +- `X-Forwarded-For` +- `X-Forwarded-Host` +- `X-Forwarded-Server` + +```apache + + ServerName shaarli.domain.tld + Redirect permanent / https://shaarli.domain.tld + + + + ServerName shaarli.domain.tld + + SSLEngine on + SSLCertificateFile /path/to/cert + SSLCertificateKeyFile /path/to/certkey + + LogLevel warn + ErrorLog /var/log/apache2/shaarli-error.log + CustomLog /var/log/apache2/shaarli-access.log combined + + RequestHeader set X-Forwarded-Proto "https" + + ProxyPass / http://127.0.0.1:10080/ + ProxyPassReverse / http://127.0.0.1:10080/ + +``` -TODO, see https://github.com/shaarli/Shaarli/issues/888 ## HAProxy +- [HAProxy documentation](https://cbonte.github.io/haproxy-dconv/) + +```conf +global + [...] + +defaults + [...] + +frontend http-in + bind :80 + redirect scheme https code 301 if !{ ssl_fc } + + bind :443 ssl crt /path/to/cert.pem + + default_backend shaarli + + +backend shaarli + mode http + option http-server-close + option forwardfor + reqadd X-Forwarded-Proto: https + + server shaarli1 127.0.0.1:10080 +``` + + ## Nginx + +- [Nginx documentation](https://nginx.org/en/docs/) + +```nginx +http { + [...] + + index index.html index.php; + + root /home/john/web; + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + + server { + listen 80; + server_name shaarli.domain.tld; + return 301 https://shaarli.domain.tld$request_uri; + } + + server { + listen 443 ssl http2; + server_name shaarli.domain.tld; + + ssl_certificate /path/to/cert + ssl_certificate_key /path/to/certkey + + location / { + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $host; + + proxy_pass http://localhost:10080/; + proxy_set_header Host $host; + proxy_connect_timeout 30s; + proxy_read_timeout 120s; + + access_log /var/log/nginx/shaarli.access.log; + error_log /var/log/nginx/shaarli.error.log; + } + } +} +``` -- cgit v1.2.3 From 32488257ee37bb484d054742f3630871a0083dbe Mon Sep 17 00:00:00 2001 From: nodiscc Date: Sat, 9 Dec 2017 15:31:45 +0100 Subject: move docker-101 reference from index.md to docker-images.md --- doc/md/docker/shaarli-images.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/md/docker') diff --git a/doc/md/docker/shaarli-images.md b/doc/md/docker/shaarli-images.md index 1d19510a..1769d7e9 100644 --- a/doc/md/docker/shaarli-images.md +++ b/doc/md/docker/shaarli-images.md @@ -1,3 +1,6 @@ +A brief guide on getting starting using docker is given in [Docker 101](docker-101.md). +To learn more about user data and how to keep it across versions, please see [Upgrade and Migration](../Upgrade-and-migration.md). + ## Get and run a Shaarli image ### DockerHub repository -- cgit v1.2.3 From 60ca6354bd1fe4acace21029389f23fa95257526 Mon Sep 17 00:00:00 2001 From: nodiscc Date: Sat, 9 Dec 2017 15:33:49 +0100 Subject: doc: move docker autobuild from index.md to shaarli-images.md --- doc/md/docker/shaarli-images.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/md/docker') diff --git a/doc/md/docker/shaarli-images.md b/doc/md/docker/shaarli-images.md index 1769d7e9..5491ee76 100644 --- a/doc/md/docker/shaarli-images.md +++ b/doc/md/docker/shaarli-images.md @@ -81,3 +81,14 @@ backstabbing_galileo $ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ``` + +### Automatic builds + +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): +``` +MY_SHAARLI_VOLUME=$(cd /path/to/shaarli/data/ && pwd -P) +docker run -ti --rm \ + -p 8000:80 \ + -v $MY_SHAARLI_VOLUME:/var/www/shaarli/data \ + shaarli/shaarli +``` -- cgit v1.2.3 From b7ca2eb2f61619066e2ef0c2d8e6f0e4377a137d Mon Sep 17 00:00:00 2001 From: nodiscc Date: Fri, 5 Jan 2018 19:41:24 +0100 Subject: doc: add armhf docker images --- doc/md/docker/shaarli-images.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/md/docker') diff --git a/doc/md/docker/shaarli-images.md b/doc/md/docker/shaarli-images.md index 5491ee76..9a27fcc8 100644 --- a/doc/md/docker/shaarli-images.md +++ b/doc/md/docker/shaarli-images.md @@ -11,6 +11,8 @@ repository. - `latest`: latest branch (tarball release) - `master`: master branch (tarball release) - `stable`: stable branch (tarball release) +- `armhf-latest`: latest branch for ARMv7 32bit processors (tarball release) +- `armhf-master`: master branch for ARMv7 32bit processors (tarball release) The `latest` and `master` images rely on: @@ -24,6 +26,7 @@ The `stable` image relies on: - [PHP5-FPM](http://php-fpm.org/) - [Nginx](http://nginx.org/) +The `armhf-*` images rely on [Linuxserver.io Alpine armhf images](https://hub.docker.com/r/lsiobase/alpine.armhf/). ### Download from DockerHub ```bash -- cgit v1.2.3 From bf4faba9ca87ded7075cdd3c1972bda64438d420 Mon Sep 17 00:00:00 2001 From: nodiscc Date: Fri, 12 Jan 2018 23:00:20 +0100 Subject: doc: docker: remove armhf tags, add link to Dockerfiles --- doc/md/docker/shaarli-images.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'doc/md/docker') diff --git a/doc/md/docker/shaarli-images.md b/doc/md/docker/shaarli-images.md index 9a27fcc8..e6734771 100644 --- a/doc/md/docker/shaarli-images.md +++ b/doc/md/docker/shaarli-images.md @@ -11,8 +11,6 @@ repository. - `latest`: latest branch (tarball release) - `master`: master branch (tarball release) - `stable`: stable branch (tarball release) -- `armhf-latest`: latest branch for ARMv7 32bit processors (tarball release) -- `armhf-master`: master branch for ARMv7 32bit processors (tarball release) The `latest` and `master` images rely on: @@ -26,7 +24,7 @@ The `stable` image relies on: - [PHP5-FPM](http://php-fpm.org/) - [Nginx](http://nginx.org/) -The `armhf-*` images rely on [Linuxserver.io Alpine armhf images](https://hub.docker.com/r/lsiobase/alpine.armhf/). +Additional [Dockerfiles](https://github.com/shaarli/Shaarli/tree/doc-docker-arm/docker) are provided for the `arm32v7` platform, relying on [Linuxserver.io Alpine armhf images](https://hub.docker.com/r/lsiobase/alpine.armhf/). ### Download from DockerHub ```bash -- cgit v1.2.3 From a3f83c15f4296530d3ceb70adde7c1cfb3f6312e Mon Sep 17 00:00:00 2001 From: nodiscc Date: Fri, 12 Jan 2018 23:06:30 +0100 Subject: doc: docker: add links to docker build and qemu documentation --- doc/md/docker/shaarli-images.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/md/docker') diff --git a/doc/md/docker/shaarli-images.md b/doc/md/docker/shaarli-images.md index e6734771..123da83e 100644 --- a/doc/md/docker/shaarli-images.md +++ b/doc/md/docker/shaarli-images.md @@ -24,7 +24,7 @@ The `stable` image relies on: - [PHP5-FPM](http://php-fpm.org/) - [Nginx](http://nginx.org/) -Additional [Dockerfiles](https://github.com/shaarli/Shaarli/tree/doc-docker-arm/docker) are provided for the `arm32v7` platform, relying on [Linuxserver.io Alpine armhf images](https://hub.docker.com/r/lsiobase/alpine.armhf/). +Additional [Dockerfiles](https://github.com/shaarli/Shaarli/tree/doc-docker-arm/docker) are provided for the `arm32v7` platform, relying on [Linuxserver.io Alpine armhf images](https://hub.docker.com/r/lsiobase/alpine.armhf/). These images must be built using [`docker build`](https://docs.docker.com/engine/reference/commandline/build/) on an `arm32v7` machine or using an emulator such as [qemu](https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/). ### Download from DockerHub ```bash -- cgit v1.2.3 From 5cb4c0d5bd0c0d2c8772864d35540765be6f6b9a Mon Sep 17 00:00:00 2001 From: nodiscc Date: Sat, 13 Jan 2018 11:48:42 +0100 Subject: doc: fix link to dockerfiles --- doc/md/docker/shaarli-images.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/md/docker') diff --git a/doc/md/docker/shaarli-images.md b/doc/md/docker/shaarli-images.md index 123da83e..12f7b5d1 100644 --- a/doc/md/docker/shaarli-images.md +++ b/doc/md/docker/shaarli-images.md @@ -24,7 +24,7 @@ The `stable` image relies on: - [PHP5-FPM](http://php-fpm.org/) - [Nginx](http://nginx.org/) -Additional [Dockerfiles](https://github.com/shaarli/Shaarli/tree/doc-docker-arm/docker) are provided for the `arm32v7` platform, relying on [Linuxserver.io Alpine armhf images](https://hub.docker.com/r/lsiobase/alpine.armhf/). These images must be built using [`docker build`](https://docs.docker.com/engine/reference/commandline/build/) on an `arm32v7` machine or using an emulator such as [qemu](https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/). +Additional [Dockerfiles](https://github.com/shaarli/Shaarli/tree/master/docker) are provided for the `arm32v7` platform, relying on [Linuxserver.io Alpine armhf images](https://hub.docker.com/r/lsiobase/alpine.armhf/). These images must be built using [`docker build`](https://docs.docker.com/engine/reference/commandline/build/) on an `arm32v7` machine or using an emulator such as [qemu](https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/). ### Download from DockerHub ```bash -- cgit v1.2.3