matomo-org / docker Goto Github PK
View Code? Open in Web Editor NEWOfficial Docker project for Matomo Analytics
Home Page: https://matomo.org
License: Other
Official Docker project for Matomo Analytics
Home Page: https://matomo.org
License: Other
Following the suggestions at https://piwik.org/docs/how-to-secure-piwik/ for this container, I installed the SecurityInfo plugin after getting up and running. It came back with the following warnings:
display_errors display_errors is enabled. This is not recommended on "production" servers, as it could reveal sensitive information. You should consider disabling this feature
group_id PHP may be executing as a "privileged" group, which could be a serious security vulnerability.
open_basedir open_basedir is disabled. When this is enabled, only files that are in the given directory/directories and their subdirectories can be read by PHP scripts. You should consider turning this on. Keep in mind that other web applications not written in PHP will not be restricted by this setting.
upload_tmp_dir upload_tmp_dir is disabled, or is set to a common world-writable directory. This typically allows other users on this server to access temporary copies of files uploaded via your PHP scripts. You should set upload_tmp_dir to a non-world-readable directory
user_id PHP may be executing as a "privileged" user, which could be a serious security vulnerability.
Would it make sense to publish the Piwik docker project on https://hub.docker.com/ ?
I saw that Wordpress, Drupal, Redis, etc. have official images posted there.
@tianon the verion has been updated, can you publish it with your script please?
Thanks!
In reference to docker-library/official-images#1321
I want to build this image on arm64 architecture but I'm not sure this tar.gz file can be support arm64 architecture. So the file of tar.gz whether or not support arm64.
What is the best practice to monitor https sites?
My scenario: I am running Drupal and other stuff in containers on a dockerhost, with external traffic coming in via an nginx reverse proxy (https://github.com/jwilder/nginx-proxy), which takes care of https/ssl/letsencrypt too. I would like to not unnecessarily expose Piwik externally.
The piwik module in Drupal seems to be able to connect to the piwik-nginx via http just fine, but apparently requires the traffic between Drupal and itself to be https, if the site itself is run on https. It says The URL to your Piwik base directory with SSL certificate installed. Required if you track a SSL enabled website. Example: "https://www.example.com/piwik/".
under the textfield where the piwik address goes.
But even with (self-signed) certificates, it fails, throwing The validation of "https://monitoring_piwik-nginx_1/piwik.php" failed with error "Error opening socket connection ssl://monitoring_piwik-nginx_1:443" (HTTP code 0)
(translated).
It looks to me like its simply not happy with the self-signed certificates. Now, before I dig deeper or just expose Piwik externally, I am wondering if there is a best practice for monitoring https sites with a dockerized Piwik? And is the behaviour of requiring the site-piwik traffic to be https when the site is running https the same for other frameworks, or is it just a Drupal quirk?
accident, sorry!
The import logs script requires python to run. Not sure is this feature should be working out of the box or if it is considered less used and requires a custom dockerfile to python...
Pulling repository docker.io/library/piwik
ERROR: Error: image library/piwik:latest not found
Hey there,
TL;DR: Official image can not run out of the box on IBM Bluemix.
Since the image was not up on docker hub, I build it myself locally and ran docker-composer up, which worked just fine. I then went ahead and pushed this image to my private repository on IBM Bluemix so I could start containers on Bluemix based on this image. However, the vulnerability scan fails for the image and thus Bluemix does not allow me to run a container based on this image.
Here are the results of the scan:
1 vulnerable package found:
DSA-3386-2 unzip Upgrade unzip to at least version 6.0-16+deb8u2
1 policy violation found:
Password lenght not compliant: "Update /etc/login.defs to ensure that PASS_MIN_LEN is >= 8"
I plan to work on this, this week or next week.
Anybody has a succesful deployment on k8s?
If you could share some experience, would be nice.
It would be nice to collaborate on that!
Hello,
I installed DockerToolBox (win), cloned docker-piwik repository and tried to run docker:
$docker-piwik> docker run --link mysql:db -d piwik
docker: An error occurred trying to connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.23/containers/create: open //
./pipe/docker_engine: The system cannot find the file specified..
See 'docker run --help'.
I also tried to setup proxy, but without any change in the message.
Do you have any idea, what could be wrong?
Thank you
After some time playing around with the piwik deployment code out there, I decided this repo would be best to work off of, but I did notice some rough corners.
For my needs, I built a repo that could be deployed directly to dokku (the diy heroku). Piwik was first created long before the concenpt of 12f, honestly it's a bit of a miracle that it's capable of operating in linux containers (and only thanks to the volume management systems). To allow for a deploy that could be configured once and in a configuration file, I setup the container to configure Piwiks on-file-system config file to accept "API" requests that finished the configuration steps. I only went as far as configuring up to the point of the website setup, but others might want to be able to fully configure the app. This sufficed rough corner 1 for me, and the scripts related to the work can be seen here. Though I should point out, I'm still disappointed with these automation scripts because they didn't work on Heroku.
To solve problem to for my own needs, I wrote a Makefile that contained the commands needed to bring the container fully online. You can see a Makefile that suffices the criteria. So when I wanted to test to see that the repo was still working I typed make
to build the docker container, followed by make boot-containers-dependency
which only booted a MySQL container. This is because I included steps to boot an nginx server within the dockerfile. I did this partly because I didn't off-hand know what command could be used to boot an nginx service in a seperate container and partly to suffice rough corner 3
Finally, to make deploying piwik quick and snappy, I added some dokku/ heroku files to allow the repo to be pushed directly to a PaaS service (dokku) to complete the majority of the installation other than Piwik's firstWebsiteSetup action. This approach to configuring Piwik relates closely to #41
That all being said, who here want's...
Hello everyone,
after deploying the piwik:3.0.3
Docker image I still get the Piwik update warning:
NEW UPDATE: PIWIK 3.0.3 Piwik 3.0.3 is available.
Please update now! (see changes).
You are currently using Piwik 3.0.2.
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
07778e5f1069 piwik:3.0.3 "/entrypoint.sh ph..." About a minute ago Up About a minute 9000/tcp piwik
So, it seems as if the 3.0.3 Docker image actually contains Piwik 3.0.2.
Thanks,
Thilo
@tianon I need your feedback on that.
in response to libresh/compose-matomo#10, I plan to add this configuration in the entrypoint.sh.
I think it would benefit to all the image users so I'll do it in this repo (and not on another Dockerfile, using FROM field).
Email is important feature for piwik (user management, reports...).
If you don't veto, then I'll do it.
For migration cases, it would be nice to support custom variables, as known from https://github.com/ecobytes/docker-piwik/tree/nossl#getting-started
We'll probably want to align both images around some Alpine core.
Hello, I just try out Piwik in Docker and I get the error from Piwik System Check.
File integrity check failed and reported some errors. You should fix this issue and then refresh this page until it shows no error.
Directories were found in your Piwik but we didn't expect them.
--> Please delete these directories to prevent errors. <--
Directory to delete: plugins/Morpheus/icons/submodules
To delete all these directories at once, you can run this command:
rm -Rf /var/www/html/plugins/Morpheus/icons/submodules
What is this Morpheus plugin? Because I can't find it on https://plugins.piwik.org/search?piwikversion=0&query=Morpheus
Hello,
When I launch docker-compose up -d
I have this error:
$ docker-compose up -d
dockerpiwik_db_1 is up-to-date
dockerpiwik_app_1 is up-to-date
Starting dockerpiwik_web_1...
Cannot start container d72ee0f888c151792036cfecd34f1825f9d829836fb6b94f3e813aa845a2a861: [8] System error: not a directory
You have the same ?
Hello,
So, I'm probably doing something wrong, but the best I have managed to receive from piwik is a blank page.
I have 3 containers:
Depending on my nginx configuration, I either get a "File not found." (not a 404, a literal string) which I interpret as nginx not passing the right cgi parameters, or a blank page. For me the blank page indicates that nginx talks to piwik, finds, the php script, but then the php fails to execute properly. I used the configuration from here too: https://github.com/perusio/piwik-nginx with the same results.
I tried running a shell inside the piwik container, and when I launch php index.php
or php piwik.php
, I get the following error:
Uncaught exception: The configuration file {/var/www/html/config/config.ini.php} has not been found or could not be read.
If the file exists, please check that /var/www/html/config/config.ini.php is readable by the user 'www-data'.
in /var/www/html/core/Application/Kernel/EnvironmentValidator.php line 63
#0 /var/www/html/core/Application/Kernel/EnvironmentValidator.php(44): Piwik\Application\Kernel\EnvironmentValidator->checkConfigFileExists('/var/www/html/c...', false)
#1 /var/www/html/core/Application/Environment.php(185): Piwik\Application\Kernel\EnvironmentValidator->validate()
#2 /var/www/html/core/Application/Environment.php(94): Piwik\Application\Environment->validateEnvironment()
#3 /var/www/html/core/dispatch.php(28): Piwik\Application\Environment->init()
#4 /var/www/html/index.php(27): require_once('/var/www/html/c...')
#5 {main}
I would imagine the config.ini.php
gets created the first time piwik is used, but here I am.
So, questions:
index.php
, piwik.php
or somewhere else?Cheers,
Hi,
the latest Tag is still pointing to 2.16.2 and not to 2.16.5
docker images | grep piwik
piwik 2.16 53d13717595a 4 days ago 445 MB
piwik 2.16.5 53d13717595a 4 days ago 445 MB
piwik latest d60109b0993a 2 weeks ago 448.7 MB
someone else also mentioned this on hub: https://hub.docker.com/_/piwik/
Got the following error:
[root@vpsFu piwik]# docker-compose up
Starting piwik_db_1
Starting piwik_app_1
ERROR: b'Cannot start container a531bb3bb6eb9479ede28a94c4ecd54d7250e0915d36cb20b7271f10218bd57f: [8] System error: not a directory'
$ docker logs piwik_app_1
Code: System error
Message: not a directory
Frames:
---
0: setupRootfs
Package: github.com/opencontainers/runc/libcontainer
File: rootfs_linux.go@40
---
1: Init
Package: github.com/opencontainers/runc/libcontainer.(*linuxStandardInit)
File: standard_init_linux.go@57
---
2: StartInitialization
Package: github.com/opencontainers/runc/libcontainer.(*LinuxFactory)
File: factory_linux.go@242
---
3: initializer
Package: github.com/docker/docker/daemon/execdriver/native
File: init.go@35
---
4: Init
Package: github.com/docker/docker/pkg/reexec
File: reexec.go@26
---
5: main
Package: main
File: docker.go@18
---
6: main
Package: runtime
File: proc.go@111
---
7: goexit
Package: runtime
File: asm_amd64.s@1696
Timestamp: 2016-01-13 21:07:09.081893736 +0100 CET
If I remove the following lines from the docker-compose file, it worked:
- ./ssmtp.conf:/etc/ssmtp/ssmtp.conf
- ./revaliases:/etc/ssmtp/revaliases
I think this has something to do with moby/moby#13670 ... ?!?
It would be great to run the container as non-root, preferably as random-non-root (via nss-wrapper). That's necessary for restricted kubernetes (e.g. openshift).
If you agree, I can provide a patch.
I have a mysql docker image running already, i want to link to that image, but i don't know how. can you give me some advises? thank you very much!
Hi,
I'm attempting to use the latest image available on Docker hub.
Myself and a number of colleagues have failed to connect to the web interface to configure the container (via HTTP or HTTPS).
I've used this run command: sudo docker run -d --name piwik -p 9000:9000 --link piwik-db piwik:latest
.
The ss-ltn
command on my host lists 9000 as a listening port. The same command in the container lists 9000 as a listening port.
The output of the docker ps
command shows the NAT is in place:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d108729f910f piwik:latest "/entrypoint.sh php-f" 13 minutes ago Up 13 minutes 0.0.0.0:9000->9000/tcp piwik
Despite all this, when I attempt to connect via port 9000 in a browser I either get an empty response or a connection refused error.
A tcpdump on the host typically shows the connection is setup, a GET sent and ACK's and then two resets sent by the container. This clearly indicates no iptables or other firewall issues.
Curls performed within the container result in this error (whether using localhost or the container's actual 172. address):
curl: (56) Recv failure: Connection reset by peer
I am currently getting errors during the database setup at step 3.
Error while trying to connect to the database server: SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers
Does any body know what this is?
Thanks
Khanh
I'm running this image on a docker 1.11.0 host like this:
docker run --name piwik -d -p 8002:9000 -e MYSQL_ROOT_PASSWORD=pw --link piwik_mdb:db piwik:2.16.0
Of course the mariadb container is running as well.
I cannot seem to get a response from the container although the port is open.
Even if I shell into the container, a curl looks like this:
root@ccfcbb9aac9a:/var/www/html# curl http://localhost:9000
curl: (56) Recv failure: Connection reset by peer
Right now the getting started is not understandable without docker experience:
docker run
command on a fresh machine seems to do nothingReadme says that it runs on port 9000 and user need proxy, but in reality, it runs on port 80 out of the box.
docker run --name test-piwik --link test-mysql:db -d piwik
Results in
26b8a4fef4a6 piwik "/entrypoint.sh ap..." Less than a second ago Up 2 seconds 80/tcp test-piwik
Not sure if the readme needs to be fixed or default configuration.
Thanks for this good docker configuration.
However, I have some issue with the crontab job.
root@bfa28b94d1c0:/var/www/html# su www-data -c "/usr/local/bin/php /var/www/html/console core:archive"
This account is currently not available.
Cause group www-data does not exists in the container.
root@bfa28b94d1c0:/var/www/html# /usr/local/bin/php /var/www/html/console core:archive --url=http://piwik.mydomain.com
[Zend_Db_Adapter_Exception]
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
[PDOException]
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known
Both piwik.mydomain.com and piwik.org pings are OK.
Any help appreciated!
The readme states I need a reverse proxy and so I tried the docker-compose option with the indiehosters-repo. I ran into multiple issues and couldn't resolve those.
I would much rather have some "official" information on this repo on how to accomplish what I want.
At the moment it seems kind of foggy and it would be great to get some input on that.
Thanks!
Piwik recommends PHP7, is there a good reason why the docker file is based on php:5.6-fpm?
Hello,
I'm trying to run piwik on my Docker server but I have some issues.
My Nginx-server is configured as it should (I think) but I get an error 502 when I connect to piwik...
Could you please help me to find a solution to use Piwik with the official Docker image.
Here, different logs.
Piwik logs after :
24-Aug-2016 12:02:16] NOTICE: fpm is running, pid 1
[24-Aug-2016 12:02:16] NOTICE: ready to handle connections
Command to launch piwik :
docker run -it -d --name piwik --link database:db piwik:latest
Nginx configuration :
upstream tfe2.ags.ovh {
## Can be connect with "bridge" network
# piwik-test
server 172.17.0.8:9000;
}
server {
server_name tfe2.ags.ovh;
listen 80 ;
access_log /var/log/nginx/access.log vhost;
return 301 https://$host$request_uri;
}
server {
server_name tfe2.ags.ovh;
listen 443 ssl http2 ;
access_log /var/log/nginx/access.log vhost;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;
ssl_prefer_server_ciphers on;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:50m;
ssl_certificate /etc/nginx/certs/tfe2.ags.ovh.crt;
ssl_certificate_key /etc/nginx/certs/tfe2.ags.ovh.key;
ssl_dhparam /etc/nginx/certs/tfe2.ags.ovh.dhparam.pem;
add_header Strict-Transport-Security "max-age=31536000";
include /etc/nginx/vhost.d/default;
location / {
proxy_pass http://tfe2.ags.ovh;
}
}
Nginx error log :
2016/08/24 12:25:22 [error] 64#64: *58 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: < ip_address >, server: tfe2.ags.ovh, request: "GET / HTTP/1.1", upstream: "http://172.17.0.8:9000/", host: "tfe2.ags.ovh"
Thank you for your time.
There is a new version out
I'd like to run Piwik in a subdirectory, but I can't find out how. It would be great if there was an environment variable for this.
If I'm trying to run it, I get the following error (via docker logs):
The configuration file {/var/www/html/config/config.ini.php} has not been found or could not be read.
If the file exists, please check that /var/www/html/config/config.ini.php is readable by the user 'www-data'.
If I log into the container I can see that the file config.ini.php hasn't been created.
Any idea why this is happening and how it can be fixed?
Hello @pierreozoux
We'd like as many people to learn about the official docker image for Piwik. For this purpose it would be awesome to write a short blog post about the project on piwik.org/blog.
Here are suggested topics for the announcement blog post:
Here is an example howto article which maybe could give us some inspiration.
Hey
I am running the latest docker image of piwik with a linked mariadb container:
docker run --name piwik -d -v /var/www/piwik.example.org/config:/var/www/html/config --link mariadb:db -p 9000:9000 piwik
The web server is nginx:
server {
listen 443 ssl;
server_name example.org;
# SSL related stuff omitted
root /var/www/html;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location ~ \.php$ {
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_intercept_errors on;
fastcgi_pass backend;
}
}
Although the app is running and I was able to install piwik successfully, it gives me a bunch of 404's for basically all assets like javascript, css and image files:
jquery.smartbanner.js?cb=7edb6f9fe6f59cf38a3b442f99b15812
jquery.smartbanner.css?cb=091b6dc35d0c304112383347fa4378f7
logo.svg
loading-blue.gif
jquery.placeholder.js?cb=7edb6f9fe6f59cf38a3b442f99b15812
...
Additionally I am not able to access the app via https://piwik.example.org/
. Instead I must enter this URL: https://piwik.example.org/index.php
. Otherwise this error occurs in the logs:
[error] 5812#5812: *17 directory index of "/var/www/html/" is forbidden
What's happening here? And how can I fix this behaviour?
We should be able to insert a video and/or audio into an article.
We're currently using Medium-Editor-Insert-Plugin 3.0 for inserting contents (pics and videos).
The regular (stable 2.4) version is based on JQuery.
Version 3.0 that we currently have is in VanillaJS.
It seems that this version is buggy for inserting videos.
Possible solutions are to fix the bug, or to move to the stable jquery and install jquery only for that page, or to use something else. Other options are welcome too…
For usability, isn't it better to run the install script from the entrypoint? That way, changing email configurations would only require changing environment variables in the compose file
ps. thanks for getting an official docker image out
If you want to test, before following the instructions, make sure you build a local piwik image:
So the instructions will becore:
git clone https://github.com/piwik/docker-piwik.git
cd docker-piwik
docker build -t piwik .
# edit variables:
vi .env
docker-compose up
we could also enable Travis CI for this repository. On each commit, a build is triggered. The build is basically a VM and you can execute anything you want, eg. to run some tests, build some package, etc.
Hi everyone,
I would like to know if there is a possibility to run a piwik container "linked" to an external mysql database server.
I will appreciate your help...
docker-compose up stops with the following error:
[...]
Status: Downloaded newer image for mysql:latest
Creating piwik_db_1
Pulling app (piwik:latest)...
Pulling repository docker.io/library/piwik
ERROR: Error: image library/piwik:latest not found
I ran Piwik like this:
sudo docker run --link some-mysql:db -p 9000:9000 -ti piwik
Then, I tried to connect to localhost:9000 and got no response (nmap says that the port seems tcpwrapped). I also tried sudo docker run --link some-mysql:db -p 9000:9000 -ti piwik bash
, then apt-get update && apt-get install -y nmap && php-fpm & nmap localhost -p 9000 -sV
and it looks like Nmap doesn't get any responses at all.
Or is it firewall on my box misbehaving? How could I diagnose that?
I guess others have already pointed out that the setup is quite hard. Having to setup a separate nginx just to handle the fastcgi, plus a third container just for a simple cron.
There is an even bigger downside to this. Since the piwik codebase has to be shared between the nginx container and the piwik container, a volume is defined:
VOLUME /var/www/html
This will put the piwik code into a volume.
The problem is, when an update comes out, this volume will not be replaced and you'll just run a newer container with the code from the old one. To upgrade, one has to manually delete the volume and container, hoping that the configuration is kept in tact.
I think it would be much better to include everything into one image, including the cron, making installation and upgrading easy as we've come to expect from Docker.
Is there a reason why it is setup like this? Perhaps I'm overlooking something?
I have created a mysql image using a Dockerfile
like so:
FROM mysql:latest
and then builded it with this command: docker build -t someMysql .
After that i have created a Dockerfile
for the piwik image like this:
FROM piwik:latest
and builded it with this command: docker build -t somePiwik .
when I do docker images
I can see this:
REPOSITORY TAG IMAGE ID CREATED SIZE
somePiwik latest 8c35c3d8471f About an hour ago 551 MB
someMysql latest 4c8234833e34 4 hours ago 361.2 MB
mysql latest 7a5866c2edbf 7 days ago 361.2 MB
piwik latest b51d068b5d69 13 days ago 551 MB
Then i run the image for mysql like this:
docker run --name mysqlcontainer -e MYSQL_ROOT_PASSWORD=root -d someMysql:latest
And also the piwik image like this linking it with the appropriate argument to the mysql-docker-container:
docker run --name piwikcontainer --link mysqlcontainer:mysql -p 9001:9000 -d somePiwik:latest
When I do a docker ps
i see the following:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
86a5a84ce311 somePiwik:latest "/entrypoint.sh php-f" 23 minutes ago Up 23 minutes 0.0.0.0:9001->9000/tcp piwikcontainer
979ba9fbc19c someMysql:latest "/entrypoint.sh mysql" About an hour ago Up About an hour 3306/tcp mysqlcontainer
It seems like everything is mapped fine.
According to the Piwik-site I should be able to use my * browser* to browse the piwik login-page using http://localhost:9001
.
Unfortunately this is not working, as I get the follwoing error from my lynx
browser:
[root@localhost mysql]# lynx http://localhost:9001
Looking up localhost:9001
Making HTTP connection to localhost:9001
Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Unexpected network read error; connection aborted.
Can't Access `http://localhost:9001/'
Alert!: Unable to access document.
lynx: Can't access startfile
1. What am I doing wrong?
2. Have I misunderstood the Piwik-site ?
3. Can someone help me to get going?
The official Docker image for Piwik declares /var/www/html as a Docker volume, in order to expose PHP sources to other containers of the stack, such as a nginx or any other webserver, which will serve as a frontend for static files and relay requests to Piwik container via PHP-FPM.
The issue is that /var/www/html is populated at first startup and as it's a volume, it will be persisted on further container recreate (such as updating piwik to a newer version) : in such case, you want to only change the version number in a docker-compose.yml file, and do a docker-compose pull && docker-compose up -d.
In that case, the old version of piwik will still be served, unless you manually clean up the /var/www/html volume beforehand (and if you hopefully host-mounted it to a know location...).
The only solution I can forsee is to provide another image, based on nginx image, which also has Piwik source, thus eliminating the need of a volume to share it. Another way of solving the issue is to make only one image, based on php:5.6-apache instead of 5.6-fpm and have the webserver included.
This is a recurrent issue of many PHP-based projects (see for example cachethq/Docker#106) and as many people tend to prefer nginx+fpm over apache+mod_php, I would suggest that we work with maintainers of the official php image to provide a "-nginx" flavor of the image.
Hi,
would it be possible to publish Piwik 3.0.1 on Docker Hub? ATM, https://hub.docker.com/_/piwik/ still lists 3.0.0 as the current version.
Thanks,
Thilo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.