Skip to content

Instantly share code, notes, and snippets.

@cloudmanic
Created August 31, 2018 21:29
Show Gist options
  • Save cloudmanic/3e607ef19e8d6b98211ad81a341e4f56 to your computer and use it in GitHub Desktop.
Save cloudmanic/3e607ef19e8d6b98211ad81a341e4f56 to your computer and use it in GitHub Desktop.
Matomo Docker
spicer@rager:~/Development/matomo$ docker pull matomo
Using default tag: latest
latest: Pulling from library/matomo
Digest: sha256:cd3c3975814ebe9bcb234d8f73f5aa8f7cce085d0b6f5e2596041b60f4a12122
Status: Image is up to date for matomo:latest
spicer@rager:~/Development/matomo$ docker run -it --rm matomo /bin/bash
root@72536f106e76:/var/www/html#
root@72536f106e76:/var/www/html#
root@72536f106e76:/var/www/html# cat core/Version.php
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
*/
namespace Piwik;
/**
* Matomo version information.
*
* @api
*/
final class Version
{
/**
* The current Matomo version.
* @var string
*/
const VERSION = '3.5.1';
public function isStableVersion($version)
{
return (bool) preg_match('/^(\d+)\.(\d+)\.(\d+)$/', $version);
}
public function isVersionNumber($version)
{
return $this->isStableVersion($version) || $this->isNonStableVersion($version);
}
private function isNonStableVersion($version)
{
return (bool) preg_match('/^(\d+)\.(\d+)\.(\d+)-.{1,4}(\d+)$/', $version);
}
}
root@72536f106e76:/var/www/html#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment