Compare commits

...
16 Commits
Author SHA1 Message Date
Michal Čihař c099349ef3 Remove not needed curl installation
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-08 13:52:48 +02:00
Michal ČihařandGitHub a602d1d4c6 Merge pull request #45 from nijel/pgp
Verify downloaded tarball using PGP
2016-08-08 13:47:24 +02:00
Michal Čihař 8a8e9eee0a Verify downloaded tarball using PGP
Fixes #43

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-08 13:44:21 +02:00
Michal Čihař a5dfdfe993 Move user configuration and simplify it's setup
- move it to root directory to make it easier to use as volume

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-08 13:09:32 +02:00
Michal Čihař f67529f585 Merge remote-tracking branch 'origin/pull/42' 2016-08-08 12:56:21 +02:00
Michal Čihař e6bc219529 Fix link to docs
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-26 20:29:10 +02:00
Michal Čihař ef53180e08 Increase number of chars allowed in secret
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-26 11:56:47 +02:00
Douglas Wagner 4cadf08f00 Updated for installing config.userdef.inc.php hook to update PHPMYADMIN custom user setttings without modifying/overriding the config.inc.php file. 2016-07-11 12:49:04 -05:00
Michal Čihař e713caa214 Remove mcrypt from dependencies, it is not needed with openssl
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-14 15:45:56 +02:00
Michal Čihař cce91f08d4 Revert "Switch to PHP 7"
Okay, the PHP 7 packages are not yet in released Alpine, we need to wait
for next release.

This reverts commit 9d0dec3d2e.
2016-06-14 15:45:15 +02:00
Michal Čihař 9d0dec3d2e Switch to PHP 7
Fixes #34

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-14 15:41:18 +02:00
Michal ČihařandGitHub 563bcafcec Merge pull request #36 from ssteinerx/Update-base-image-to-Alpine-3.4
Update base image to alpine:latest
2016-06-14 15:39:32 +02:00
Steve SteinerandGitHub 0bc8b4025b Update base image to alpine:latest
As per note in previous version of Dockerfile to switch when 3.4 was out.

Also removed comment since it's done.
2016-06-14 09:34:55 -04:00
Michal Čihař 812590e038 Remove PMA_ABSOLUTE_URI as it is no longer needed with 4.6
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-10 13:49:55 +02:00
Michal Čihař 7d6f729bc6 Fix PHP configuration name
Fixes #32

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-10 12:34:58 +02:00
Michal Čihař 593d7f5f96 Include PHP modules for bz2 and zip
Fixes #33

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-10 12:34:01 +02:00
5 changed files with 47 additions and 19 deletions
+16 -6
View File
@@ -1,11 +1,21 @@
# Switch back to stable once 3.4 is out
FROM alpine:edge
FROM alpine:latest
RUN apk add --no-cache php5-cli php5-mysqli php5-ctype php5-xml php5-gd php5-zlib php5-openssl php5-curl php5-opcache php5-json php5-mcrypt curl
RUN apk add --no-cache php5-cli php5-mysqli php5-ctype php5-xml php5-gd php5-zlib php5-bz2 php5-zip php5-openssl php5-curl php5-opcache php5-json
RUN curl --location https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz | tar xzf - \
&& mv phpMyAdmin* /www \
&& rm -rf /www/js/jquery/src/ /www/examples /www/po/
COPY phpmyadmin.keyring /
RUN set -x \
&& export GNUPGHOME="$(mktemp -d)" \
&& apk add --no-cache curl gnupg \
&& curl --output phpMyAdmin-latest-all-languages.tar.gz --location https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz \
&& curl --output phpMyAdmin-latest-all-languages.tar.gz.asc --location https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz.asc \
&& gpgv --keyring /phpmyadmin.keyring phpMyAdmin-latest-all-languages.tar.gz.asc phpMyAdmin-latest-all-languages.tar.gz \
&& apk del curl gnupg \
&& rm -rf "$GNUPGHOME" \
&& tar xzf phpMyAdmin-latest-all-languages.tar.gz \
&& rm -f phpMyAdmin-latest-all-languages.tar.gz phpMyAdmin-latest-all-languages.tar.gz.asc \
&& mv phpMyAdmin* /www \
&& rm -rf /www/js/jquery/src/ /www/examples /www/po/
COPY config.inc.php /www/
COPY run.sh /run.sh
+18 -4
View File
@@ -48,8 +48,23 @@ Using the docker-compose.yml from https://github.com/phpmyadmin/docker
docker-compose up -d
```
## Usage behind reverse proxys
Set the variable ``PMA_ABSOLUTE_URI`` to the fully-qualified path (``https://pma.example.net/``) where the reverse proxy makes phpMyAdmin available.
## Adding Custom Configuration
You can add your own custom config.inc.php settings (such as Configuration Storage setup)
by creating a file named "config.user.inc.php" with the various user defined settings
in it, and then linking it into the container using:
```
-v /some/local/directory/config.user.inc.php:/config.user.inc.php
```
On the "docker run" line like this:
```
docker run --name myadmin -d --link mysql_db_server:db -p 8080:80 -v /some/local/directory/config.user.inc.php:/config.user.inc.php phpmyadmin/phpmyadmin
```
See the following links for config file information.
http://docs.phpmyadmin.net/en/latest/config.html#config
http://docs.phpmyadmin.net/en/latest/setup.html
## Environment variables summary
@@ -58,10 +73,9 @@ Set the variable ``PMA_ABSOLUTE_URI`` to the fully-qualified path (``https://pma
* ``PMA_PORT`` - define port of the MySQL server
* ``PMA_HOSTS`` - define comma separated list of address/host names of the MySQL servers
* ``PMA_USER`` and ``PMA_PASSWORD`` - define username to use for config authentication method
* ``PMA_ABSOLUTE_URI`` - define user-facing URI
* ``PHP_UPLOAD_MAX_FILESIZE`` - define upload_max_filesize and post_max_size PHP settings
* ``PHP_MAX_INPUT_VARS`` - define max_input_vars PHP setting
For more detailed documentation see http://docs.phpmyadmin.net/en/latest/setup.html#installing-using-docker
For more detailed documentation see https://docs.phpmyadmin.net/en/latest/setup.html#installing-using-docker
[hub]: https://hub.docker.com/r/phpmyadmin/phpmyadmin/
+7 -7
View File
@@ -10,7 +10,6 @@ $vars = array(
'PMA_PORT',
'PMA_USER',
'PMA_PASSWORD',
'PMA_ABSOLUTE_URI'
);
foreach ($vars as $var) {
if (!isset($_ENV[$var]) && getenv($var)) {
@@ -23,11 +22,6 @@ if (isset($_ENV['PMA_ARBITRARY']) && $_ENV['PMA_ARBITRARY'] === '1') {
$cfg['AllowArbitraryServer'] = true;
}
/* Play nice behind reverse proxys */
if (isset($_ENV['PMA_ABSOLUTE_URI'])) {
$cfg['PmaAbsoluteUri'] = trim($_ENV['PMA_ABSOLUTE_URI']);
}
/* Figure out hosts */
/* Fallback to default linked */
@@ -46,7 +40,7 @@ for ($i = 1; isset($hosts[$i - 1]); $i++) {
if (isset($_ENV['PMA_PORT'])) {
$cfg['Servers'][$i]['port'] = $_ENV['PMA_PORT'];
}
if (isset($_ENV['PMA_USER'])) {
if (isset($_ENV['PMA_USER'])) {
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = $_ENV['PMA_USER'];
$cfg['Servers'][$i]['password'] = isset($_ENV['PMA_PASSWORD']) ? $_ENV['PMA_PASSWORD'] : null;
@@ -61,3 +55,9 @@ for ($i = 1; isset($hosts[$i - 1]); $i++) {
/* Uploads setup */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
/* Include User Defined Settings Hook */
if (file_exists('/config.user.inc.php')) {
include('/config.user.inc.php');
}
Binary file not shown.
+6 -2
View File
@@ -4,12 +4,16 @@ set -x
if [ ! -f /www/config.secret.inc.php ] ; then
cat > /www/config.secret.inc.php <<EOT
<?php
\$cfg['blowfish_secret'] = '`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`';
\$cfg['blowfish_secret'] = '`cat /dev/urandom | tr -dc 'a-zA-Z0-9~!@#$%^&*_()+}{?></";.,[]=-' | fold -w 32 | head -n 1`';
EOT
fi
if [ ! -f /config.user.inc.php ] ; then
touch /config.user.inc.php
fi
exec php -S 0.0.0.0:80 -t /www/ \
-d upload_max_filesize=$PHP_UPLOAD_MAX_FILESIZE \
-d post_max_size=$PHP_UPLOAD_MAX_FILESIZE \
-d max_input_vars=$PHP_MAX_INPUT_VARS \
-d session.save-path=/sessions
-d session.save_path=/sessions