3.0.4-r5 release

Removes VOLUME instruction from the Dockerfile
This commit is contained in:
Bitnami Bot
2017-07-04 17:01:00 +00:00
parent 8d546de83e
commit 26404748ed
3 changed files with 58 additions and 109 deletions

View File

@@ -1,14 +1,14 @@
FROM bitnami/minideb-extras:jessie-r16
FROM bitnami/minideb-extras:jessie-r19
LABEL maintainer "Bitnami <containers@bitnami.com>"
# Install required system packages and dependencies
RUN install_packages libapr1 libaprutil1 libbz2-1.0 libc6 libcomerr2 libcurl3 libexpat1 libffi6 libfreetype6 libgcc1 libgcrypt20 libgmp10 libgnutls-deb0-28 libgpg-error0 libgssapi-krb5-2 libhogweed2 libicu52 libidn11 libjpeg62-turbo libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblzma5 libmcrypt4 libncurses5 libnettle4 libp11-kit0 libpcre3 libpng12-0 libpq5 libreadline6 librtmp1 libsasl2-2 libssh2-1 libssl1.0.0 libstdc++6 libsybdb5 libtasn1-6 libtidy-0.99-0 libtinfo5 libuuid1 libxml2 libxslt1.1 zlib1g
RUN bitnami-pkg unpack apache-2.4.25-0 --checksum 8b46af7d737772d7d301da8b30a2770b7e549674e33b8a5b07480f53c39f5c3f
RUN bitnami-pkg unpack php-7.0.19-0 --checksum dcd5e4a19792dbfde5157d33f09e3c030ac11da92606ade08576bea795d6ac53
RUN bitnami-pkg install mysql-client-10.1.23-1 --checksum 0be92fcc4f7fec93edfa7f788e2bbb87b5b3aac92dfdec159a10590345362512
RUN bitnami-pkg install libphp-7.0.19-1 --checksum a72cb1bc3513549b5e94052549e78921a127617c38a4bd4586ae26976cac0af6
RUN bitnami-pkg unpack apache-2.4.26-0 --checksum 2d01547a273e715388bae110707a41f458b5092193d31e6b726b5527a56a1eac
RUN bitnami-pkg unpack php-7.0.20-0 --checksum 78181d1320567be07448e75e4783ce0269b433fc9e7ed8eff67abcff7f7327e9
RUN bitnami-pkg install mysql-client-10.1.25-0 --checksum 513ef36ab1efa5570332547c2027ae29886fe4bb56472de11ca083423a3fe366
RUN bitnami-pkg install libphp-7.0.20-0 --checksum 9ec5ab2093723889e8c90e9e34f7434939c0c8d2ea054b4fc5af68e21f6ebaa5
RUN bitnami-pkg unpack piwik-3.0.4-0 --checksum 037a9a4b84bf8d920321a2623f38efb39b21fdef4469c02eb8742060e832fdad
COPY rootfs /
@@ -16,7 +16,7 @@ COPY rootfs /
ENV APACHE_HTTPS_PORT_NUMBER="443" \
APACHE_HTTP_PORT_NUMBER="80" \
BITNAMI_APP_NAME="piwik" \
BITNAMI_IMAGE_VERSION="3.0.4-r4" \
BITNAMI_IMAGE_VERSION="3.0.4-r5" \
MARIADB_HOST="mariadb" \
MARIADB_PASSWORD="" \
MARIADB_PORT_NUMBER="3306" \
@@ -36,7 +36,6 @@ ENV APACHE_HTTPS_PORT_NUMBER="443" \
VOLUME ["/bitnami/apache","/bitnami/php","/bitnami/piwik"]
EXPOSE 80 443

View File

@@ -5,7 +5,7 @@ services:
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- 'mariadb_data:/bitnami/mariadb'
- 'mariadb_data:/bitnami'
piwik:
image: 'bitnami/piwik:3'
labels:
@@ -16,15 +16,9 @@ services:
depends_on:
- mariadb
volumes:
- 'piwik_data:/bitnami/piwik'
- 'apache_data:/bitnami/apache'
- 'php_data:/bitnami/php'
- 'piwik_data:/bitnami'
volumes:
mariadb_data:
driver: local
piwik_data:
driver: local
apache_data:
driver: local
php_data:
driver: local

View File

@@ -1,5 +1,5 @@
[![CircleCI](https://circleci.com/gh/bitnami/bitnami-docker-piwik/tree/master.svg?style=shield)](https://circleci.com/gh/bitnami/bitnami-docker-piwik/tree/master)
[![Slack](http://slack.oss.bitnami.com/badge.svg)](http://slack.oss.bitnami.com)
[![Slack](https://img.shields.io/badge/slack-join%20chat%20%E2%86%92-e01563.svg)](http://slack.oss.bitnami.com)
[![Kubectl](https://img.shields.io/badge/kubectl-Available-green.svg)](https://raw.githubusercontent.com/bitnami/bitnami-docker-piwik/master/kubernetes.yml)
# What is Piwik?
@@ -11,16 +11,17 @@ https://www.piwik.org/
# TL;DR;
## Docker Compose
```bash
$ curl -LO https://raw.githubusercontent.com/bitnami/bitnami-docker-piwik/master/docker-compose.yml
$ docker-compose up
$ curl -sSL https://raw.githubusercontent.com/bitnami/bitnami-docker-piwik/master/docker-compose.yml > docker-compose.yml
$ docker-compose up -d
```
## Kubernetes
> **WARNING:** This is a beta configuration, currently unsupported.
Get the raw URL pointing to the kubernetes.yml manifest and use kubectl to create the resources on your Kubernetes cluster like so:
Get the raw URL pointing to the `kubernetes.yml` manifest and use `kubectl` to create the resources on your Kubernetes cluster like so:
```bash
$ kubectl create -f https://raw.githubusercontent.com/bitnami/bitnami-docker-piwik/master/kubernetes.yml
@@ -36,16 +37,17 @@ $ kubectl create -f https://raw.githubusercontent.com/bitnami/bitnami-docker-piw
# Prerequisites
To run this application you need Docker Engine 1.10.0. Docker Compose is recommended with a version 1.6.0 or later.
To run this application you need [Docker Engine](https://www.docker.com/products/docker-engine) >= `1.10.0`. [Docker Compose](https://www.docker.com/products/docker-compose) is recommended with a version `1.6.0` or later.
# How to get this image
The recommended way to get the Bitnami Piwik Docker Image is to pull the prebuilt image from the [Docker Hub Registry](https://hub.docker.com/r/bitnami/piwik/).
To use a specific version, you can pull a versioned tag. Find the [list of available versions] (https://hub.docker.com/r/bitnami/piwik/tags/) in the Docker Hub Registry.
```bash
docker pull bitnami/piwik:[TAG]
```
If you wish, you can also build the image youself.
```bash
@@ -53,13 +55,14 @@ docker build -t bitnami/piwik:latest https://github.com/bitnami/bitnami-docker-p
```
# How to use this image
Piwik requires access to a MySQL database or MariaDB database to store information. It uses our [MariaDB image] (https://github.com/bitnami/bitnami-docker-mariadb) for the database requirements.
## Run the Piwik image using Docker Compose
This is the recommended way to run Piwik. You can use the following docker compose template:
```
```yaml
version: '2'
services:
@@ -68,16 +71,14 @@ services:
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- 'mariadb_data:/bitnami/mariadb'
- 'mariadb_data:/bitnami'
application:
image: 'bitnami/piwik:latest'
ports:
- '80:80'
- '443:443'
volumes:
- 'piwik_data:/bitnami/piwik'
- 'php_data:/bitnami/php'
- 'apache_data:/bitnami/apache'
- 'piwik_data:/bitnami'
depends_on:
- mariadb
@@ -86,8 +87,6 @@ volumes:
driver: local
piwik_data:
driver: local
apache_data:
driver: local
```
## Run the Piwik image using the Docker Command Line
@@ -96,7 +95,7 @@ If you want to run the application manually instead of using docker-compose, the
1. Create a new network for the application and the database:
```
```bash
$ docker network create piwik_network
```
@@ -110,7 +109,7 @@ If you want to run the application manually instead of using docker-compose, the
3. Run the Piwik container:
```
```bash
$ docker run -d -p 80:80 --name piwik --net=piwik_network bitnami/piwik
```
@@ -118,19 +117,19 @@ Then you can access your application at http://your-ip/
## Persisting your application
If you remove every container and volume all your data will be lost, and the next time you run the image the application will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed.
If you remove the container all your data and configurations will be lost, and the next time you run the image the database will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed.
If you are using docker-compose your data will be persistent as long as you don't remove `mariadb_data`, `piwik_data` and `apache_data` volumes.
For persistence you should mount a volume at the `/bitnami` path. Additionally you should mount a volume for [persistence of the MariaDB data](https://github.com/bitnami/bitnami-docker-mariadb#persisting-your-database).
The above examples define docker volumes namely `mariadb_data` and `piwik_data`. The Piwik application state will persist as long as these volumes are not removed.
To avoid inadvertent removal of these volumes you can [mount host directories as data volumes](https://docs.docker.com/engine/tutorials/dockervolumes/). Alternatively you can make use of volume plugins to host the volume data.
> **Note!** If you have already started using your application, follow the steps on [backing](#backing-up-your-application) up to pull the data from your running container down to your host.
### Mount host directories as data volumes with Docker Compose
This requires a minor change to the `docker-compose.yml` template previously shown:
```
```yaml
version: '2'
services:
@@ -139,7 +138,7 @@ services:
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- '/path/to/your/local/mariadb_data:/bitnami/mariadb'
- '/path/to/mariadb-persistence:/bitnami'
piwik:
image: 'bitnami/piwik:latest'
depends_on:
@@ -148,9 +147,7 @@ services:
- '80:80'
- '443:443'
volumes:
- '/path/to/piwik-persistence:/bitnami/piwik'
- '/path/to/php-persistence:/bitnami/php'
- '/path/to/apache-persistence:/bitnami/apache'
- '/path/to/piwik-persistence:/bitnami'
```
### Mount host directories as data volumes using the Docker command line
@@ -159,28 +156,26 @@ In this case you need to specify the directories to mount on the run command. Th
1. Create a network (if it does not exist):
```
```bash
$ docker network create piwik-tier
```
2. Create a MariaDB container with host volume:
```
$$ docker run -d --name mariadb -e ALLOW_EMPTY_PASSWORD=yes \
```bash
$ docker run -d --name mariadb -e ALLOW_EMPTY_PASSWORD=yes \
--net piwik-tier \
--volume /path/to/mariadb-persistence:/bitnami/mariadb \
--volume /path/to/mariadb-persistence:/bitnami \
bitnami/mariadb:latest
```
*Note:* You need to give the container a name in order to Piwik to resolve the host
3. Create the Piwik container with host volumes:
```
```bash
$ docker run -d --name piwik -p 80:80 -p 443:443 \
--net piwik-tier \
--volume /path/to/piwik-persistence:/bitnami/piwik \
--volume /path/to/apache-persistence:/bitnami/apache \
--volume /path/to/php-persistence:/bitnami/php \
--volume /path/to/piwik-persistence:/bitnami \
bitnami/piwik:latest
```
@@ -190,7 +185,7 @@ Bitnami provides up-to-date versions of MariaDB and Piwik, including security pa
1. Get the updated images:
```
```bash
$ docker pull bitnami/piwik:latest
```
@@ -199,7 +194,15 @@ Bitnami provides up-to-date versions of MariaDB and Piwik, including security pa
* For docker-compose: `$ docker-compose stop piwik`
* For manual execution: `$ docker stop piwik`
3. (For non-compose execution only) Create a [backup](#backing-up-your-application) if you have not mounted the piwik folder in the host.
3. Take a snapshot of the application state
```bash
$ rsync -a /path/to/piwik-persistence /path/to/piwik-persistence.bkp.$(date +%Y%m%d-%H.%M.%S)
```
Additionally, [snapshot the MariaDB data](https://github.com/bitnami/bitnami-docker-mariadb#step-2-stop-and-backup-the-currently-running-container)
You can use these snapshots to restore the application state should the upgrade fail.
4. Remove the currently running container
@@ -212,26 +215,26 @@ Bitnami provides up-to-date versions of MariaDB and Piwik, including security pa
* For manual execution ([mount](#mount-persistent-folders-manually) the directories if needed): `docker run --name piwik bitnami/piwik:latest`
# Configuration
## Environment variables
When you start the Piwik image, you can adjust the configuration of the instance by passing one or more environment variables either on the docker-compose file or on the docker run command line. If you want to add a new environment variable:
When you start the Piwik image, you can adjust the configuration of the instance by passing one or more environment variables either on the docker-compose file or on the docker run command line. If you want to add a new environment variable:
* For docker-compose add the variable name and value under the application section:
```
```yaml
application:
image: bitnami/piwik:latest
ports:
- 80:80
environment:
- PIWIK_PASSWORD=my_password
volumes_from:
- application_data
```
* For manual execution add a `-e` option with each variable and value:
```
$ docker run -d -e PIWIK_PASSWORD=my_password -p 80:80 --name piwik -v /your/local/path/bitnami/piwik:/bitnami/piwik --net=piwik_network bitnami/piwik
```bash
$ docker run -d -e PIWIK_PASSWORD=my_password -p 80:80 --name piwik -v /your/local/path/bitnami/piwik:/bitnami --net=piwik_network bitnami/piwik
```
Available variables:
@@ -261,7 +264,7 @@ This would be an example of SMTP configuration using a Gmail account:
* docker-compose:
```
```yaml
application:
image: bitnami/piwik:latest
ports:
@@ -276,71 +279,24 @@ This would be an example of SMTP configuration using a Gmail account:
* For manual execution:
```
```bash
$ docker run -d -e SMTP_HOST=smtp.gmail.com -e SMTP_PROTOCOL=TLS -e SMTP_PORT=587 -e SMTP_USER=your_email@gmail.com -e \
SMTP_PASSWORD=your_password -p 80:80 --name piwik -v /your/local/path/bitnami/piwik:/bitnami/piwik bitnami/piwik
SMTP_PASSWORD=your_password -p 80:80 --name piwik -v /your/local/path/bitnami/piwik:/bitnami bitnami/piwik
```
# Backing up your container
To backup your application data follow these steps:
## Back up Piwik using Docker Compose
1. Stop the Piwik container:
* For docker-compose: `$ docker-compose stop piwik`
2. Copy the Piwik, PHP and Apache data to your backup path:
```bash
$ docker cp $(docker-compose ps -q piwik):/bitnami/piwik/ /path/to/backups/piwik/latest/
$ docker cp $(docker-compose ps -q piwik):/bitnami/apache/ /path/to/backups/apache/latest/
$ docker cp $(docker-compose ps -q piwik):/bitnami/php/ /path/to/backups/php/latest/
```
3. Start the Piwik container:
```bash
$ docker-compose start piwik
```
## Back up Piwik using the Docker Command Line
1. Stop the Piwik container:
2. Copy the Piwik,PHP and Apache data to your backup path:
```bash
$ docker cp piwik:/bitnami/piwik/ /path/to/backups/piwik/latest/
$ docker cp piwik:/bitnami/apache/ /path/to/backups/apache/latest/
$ docker cp piwik:/bitnami/php/ /path/to/backups/php/latest/
```
3. Start the Piwik container:
```bash
$ docker-compose start piwik
```
# Restoring a backup
To restore your application using backed up data simply mount the folder with Piwik data in the container. See [persisting your application](#persisting-your-application) section for more info.
# Contributing
We'd love for you to contribute to this container. You can request new features by creating an
[issue](https://github.com/bitnami/bitnami-docker-piwik/issues), or submit a [pull request](https://github.com/bitnami/bitnami-docker-piwik/pulls) with your contribution.
We'd love for you to contribute to this container. You can request new features by creating an [issue](https://github.com/bitnami/bitnami-docker-piwik/issues), or submit a [pull request](https://github.com/bitnami/bitnami-docker-piwik/pulls) with your contribution.
# Issues
If you encountered a problem running this container, you can file an
[issue](https://github.com/bitnami/bitnami-docker-piwik/issues). For us to provide better support,
be sure to include the following information in your issue:
If you encountered a problem running this container, you can file an [issue](https://github.com/bitnami/bitnami-docker-piwik/issues). For us to provide better support, be sure to include the following information in your issue:
- Host OS and version
- Docker version (`docker version`)
- Output of `docker info`
- Version of this container (`echo $BITNAMI_IMAGE_VERSION` inside the container)
- The command you used to run the container, and any relevant output you saw (masking any sensitive
information)
- The command you used to run the container, and any relevant output you saw (masking any sensitive information)
# Community
@@ -350,7 +306,7 @@ Discussions are archived at [bitnami-oss.slackarchive.io](https://bitnami-oss.sl
# License
Copyright (c) 2017 Bitnami
Copyright 2017 Bitnami
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.