Compare commits

...
224 Commits
Author SHA1 Message Date
Isaac Bennetch c6aee5664c Update to 4.8.0
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2018-04-07 11:42:13 -04:00
Isaac Bennetch b024df6c3c Update to 4.7.9
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2018-03-05 13:21:16 -05:00
Isaac Bennetch ffedad4cdf Update to 4.7.8
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2018-02-20 14:29:01 -05:00
Michal Čihař d53771b561 Bring back original SQL lookup
Issue #144

Signed-off-by: Michal Čihař <michal@cihar.com>
2018-02-12 14:48:40 +01:00
Michal Čihař 3bd49fb1ef Avoid using tabs
Issue #144

Signed-off-by: Michal Čihař <michal@cihar.com>
2018-02-12 14:47:37 +01:00
Michal Čihař d9236dfdad Merge remote-tracking branch 'origin/pull/144' 2018-02-12 14:47:07 +01:00
Michal Čihař 5e02108932 Increase fastcgi buffers
phpMyAdmin is sometimes manipulating with too many cookies to fit into
standard buffer.

Fixes #147

Signed-off-by: Michal Čihař <michal@cihar.com>
2018-02-12 14:36:08 +01:00
J0WI 3a01bacb26 Keep old path for local testing 2018-02-10 14:22:18 +01:00
J0WI c09ec0fda8 Adjust paths for tests 2018-01-03 15:15:35 +01:00
J0WI 621e3ad755 Upgrade Alpine and PHP version 2018-01-02 23:56:58 +01:00
J0WIandJ0WI c03fa82b56 Use upstream PHP FPM Alpine Docker image 2018-01-02 23:56:11 +01:00
Michal ČihařandGitHub f5644c53c8 Merge pull request #145 from nijel/alpine-3.7
Update to Alpine 3.7
2018-01-02 11:20:05 +01:00
Michal Čihař 45873ade6a Update to Alpine 3.7
Signed-off-by: Michal Čihař <michal@cihar.com>
2018-01-02 11:10:15 +01:00
Isaac Bennetch 7aa164f6e1 Update to 4.7.7
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2017-12-23 09:40:30 -05:00
Michal Čihař c086bcea60 Remove no longer used configuration
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-12-14 10:54:36 +01:00
Michal Čihař 885eb78b98 Set $i to last used server in configuration
This makes it easier to adjust it in config.user.inc.php.

Fixes #142

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-12-14 10:50:21 +01:00
Isaac Bennetch 686bf94364 Update to 4.7.6
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2017-11-30 22:37:35 -05:00
Michal ČihařandGitHub ade6f52350 Merge pull request #140 from kujiy/master
Added description of `PMA_PORTS`
2017-11-20 09:42:24 +01:00
KujiyandGitHub c29aadee1b Added description of PMA_PORTS 2017-11-20 14:30:46 +09:00
Isaac Bennetch 30857caf5c Update for phpMyAdmin 4.7.5
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2017-10-23 09:33:39 -04:00
Michal Čihař 2c92dfa55c Add configuration for Probot Stale
See https://github.com/probot/stale/

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-05 13:56:56 +02:00
Michal Čihař a576282372 Update to Alpine linux 3.6
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-09-05 13:55:59 +02:00
Isaac Bennetch c4abbbaa35 Update to 4.7.4
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2017-08-24 19:30:29 -04:00
Michal Čihař 15e82b23d2 Update to 4.7.3
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-07-20 23:09:24 +02:00
Isaac Bennetch ff2edd1f87 Update Docker image to phpMyAdmin 4.7.2
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2017-06-29 15:35:37 -04:00
Michal Čihař 275b59e3dd Remove no longer needed ctype dependency
Fixes #115

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-06-19 12:42:05 +02:00
Michal ČihařandGitHub a18b6e3842 Merge pull request #128 from tomasliubinas/patch-1
Remove link to db container
2017-06-07 15:25:14 +02:00
Tomas LiubinasandGitHub 524e669ce9 Remove link to another container
You don't need linking to db container in case of arbitrary server
2017-06-07 16:09:49 +03:00
Isaac Bennetch 8884f19c18 Update Docker image to 4.7.1
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2017-05-26 12:36:15 -04:00
Michal Čihař 1cfae7dbf6 Document new docker tags
We will build images based on snapshots as well.

Fixes #109

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-05-05 16:18:49 +02:00
Michal ČihařandGitHub 24fd978c91 Run Travis tests on Trusty (#123)
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-05-05 14:15:52 +02:00
Michal Čihař 77d49d4d88 Create directory for sessions
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-28 13:20:04 +02:00
Michal Čihař 76631a48de Remove VOLUME from Dockerfile
Fixes #117

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-28 12:06:14 +02:00
Michal Čihař 6f28900cf9 Increase fastcgi_read_timeout
Fixes #120

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-28 11:54:58 +02:00
Michal Čihař 3febe28134 Document 4.7 tag
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-11 17:33:56 +02:00
Michal Čihař 1bcaeb5fec Fix getting empty values from environment
If environemnt variable is empty and is not part of $_ENV, the getenv
(obviously) returns empty string, but we should use it.

Fixes #118

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-11 17:28:29 +02:00
Michal Čihař 1204bcd696 Do not set password to null when not specified
This makes the authentication code think this parameter was not set at
all.

Fixes #118

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-11 17:21:32 +02:00
ericfjosneandMichal Čihař 447c731aaa Add PMA_PORTS configuration
Now enabling custom port for each hosts of the PMA_HOSTS environment variable, through the use of a new PMA_PORTS environment variable.

Fixes #112
2017-04-07 15:24:36 +02:00
Michal Čihař 69a0e832d9 Install php7-ctype into the container
It is needed by Symfony ExpressionLanguage (which is used by
motranslator for plurals).

This can be reverted once ExpressionLanguage is fixed
https://github.com/symfony/symfony/pull/22325

Fixes #115

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-07 07:53:31 +02:00
Michal Čihař 0fb67d3437 Adjust cleanup to current releases
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-05 20:39:40 +02:00
Michal Čihař 331c3452f4 These files are no longer part of release
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-05 20:37:56 +02:00
Michal Čihař 942a0dd5ff Update to 4.7.0
Fixes #113

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-04-05 20:10:35 +02:00
Michal Čihař c76721ba8b Fix typo
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 15:18:16 +02:00
Michal Čihař 554e98df45 Add dabase server link to docker-compose
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 15:14:02 +02:00
Michal Čihař 5646cff98e Do not report retries
This is expected to take some time...

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 15:09:20 +02:00
Michal Čihař 382f9b9489 better progress reporting
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 15:07:27 +02:00
Michal Čihař 70b6297233 Fix path to testing configuration
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 15:02:09 +02:00
Michal Čihař 6314b17ebd Need more time to run tests
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 15:01:34 +02:00
Michal Čihař 63fd59434e Display logs on timeout
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 14:51:04 +02:00
Michal Čihař a2782dd8f6 Detect correct path to sql file
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 14:50:01 +02:00
Michal Čihař 61bc237761 Document this is supposed to fail right now
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 14:30:32 +02:00
Michal Čihař 6736b49f7a Fix expression calculation
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 14:27:00 +02:00
Michal Čihař b5305971ba Verify test result from docker-compose.testing.yml
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:38:35 +02:00
Michal Čihař 2ebc458766 Run pip installation while building Docker container
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:30:44 +02:00
Michal Čihař 21b0804166 Use latest images for composer testing as well
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:30:21 +02:00
Michal Čihař b35554203c Fix path to testing script
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:27:10 +02:00
Michal Čihař e5a78047b2 Move all testing files into subdirectory
This makes the file structure a bit cleaner.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:24:10 +02:00
Michal Čihař a7aa88b4c6 Specify correct server to test
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:18:09 +02:00
Michal Čihař b45585ea00 Remove trailing whitespace
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:12:31 +02:00
Michal Čihař 5d3536c381 Ignore testing dockerfile from docker
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:12:11 +02:00
Michal Čihař 24679b0c0b Run docker-compose tests in Travis
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:11:04 +02:00
Michal Čihař f5c3a1b628 Avoid using echo -e
It is not working on some /bin/sh versions and there is no reason to
enforce bash just because of this.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:08:37 +02:00
Michal Čihař d79872987d Avoid setting set -e
We are handling error codes, so we do not want script to terminate automatically

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:08:10 +02:00
Paulo LobatoandMichal Čihař ed5d9c5fc9 Provision local test env similar the CI's tests
- Run tests inside or not container
2017-03-28 11:06:54 +02:00
Michal Čihař 446ed9e0d0 Use separate Dockerfile for testing image
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-28 11:05:23 +02:00
Paulo LobatoandMichal Čihař 4ddc41bc29 Document the docker-compose test environment 2017-03-28 11:04:12 +02:00
Paulo LobatoandMichal Čihař ec28d93349 Add database containers on compose test env
- Add MariaDB 10.1 version
  - Add MySQL 5.7 version
  - Link databases to PHPMyAdmin container
2017-03-28 11:03:46 +02:00
Michal Čihař 0ac5c9516c Fix syntax errors
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 11:31:55 +01:00
Michal Čihař a1270dc0d5 Avoid using non ascii chars
This just makes the testing harder

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 11:26:18 +01:00
Michal Čihař 73ea59e04b Impove coding style
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 11:25:56 +01:00
Michal Čihař 54a5953b37 Mechanize does not support Python 3
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 11:11:01 +01:00
Michal Čihař d07907e15d Use python 3 for testing
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 11:08:40 +01:00
Michal Čihař e2f38b46ab Install html5lib needed for mechanize
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 11:02:12 +01:00
Michal Čihař cbcd23494f Generate password before using it
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 10:59:03 +01:00
Michal Čihař 4432177a0a Generate random passwords for test
This way nobody will think there is anything secret in the
.travis.yml.

See https://github.com/phpmyadmin/phpmyadmin/issues/13115

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-22 10:34:03 +01:00
Michal Čihař e2052a2066 Enable opcache fast shutdown
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-02 09:54:30 +01:00
Michal Čihař 6e3955516f Disable opcache.use_cwd
All scripts are executed in single working directory, so it should not
cause any harm and according to documentation it should perform better.

Issue #98

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-02 09:45:40 +01:00
Michal Čihař 29d69f34ad Disable opcache API
By setting non existing path as restrict_api.

Fixes #65

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-02 09:44:13 +01:00
Michal Čihař ddfe8e2b1c Update php.ini
Update to match php.ini-production from PHP 7.0.

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-02 09:40:43 +01:00
Michal Čihař facd453fc2 Disable allow_url_fopen
Fixes #55

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-03-02 09:27:46 +01:00
Michal Čihař b4d05f2604 Update to 4.6
Fixes #105

Signed-off-by: Michal Čihař <michal@cihar.com>
2017-02-06 11:24:11 +01:00
Michal ČihařandGitHub ff50a29234 Merge pull request #102 from nijel/alpine-3.5
Upgrade to Alpine 3.5
2017-01-02 17:14:57 +01:00
Michal Čihař e943ff30d0 Merge remote-tracking branch 'origin/pull/94' into alpine-3.5 2017-01-02 17:00:46 +01:00
Michal Čihař 19a74cb25f Fix program name
Signed-off-by: Michal Čihař <michal@cihar.com>
2017-01-02 16:56:07 +01:00
Michal Čihař a9cce1d72c Upgrade to Alpine 3.5
Also switch to PHP 7

Fixes #34

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-22 19:41:50 +01:00
Michal Čihař 4bc799bdb4 Fix markup
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-06 11:20:27 +01:00
Michal Čihař cc3e874181 Document hub tags
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-06 11:19:29 +01:00
Michal Čihař ba761c1841 Update to 4.6.5.2
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-06 09:03:57 +01:00
Michal Čihař d67fafa56c Remove not needed dependency on ctype
Fixes #96

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-05 08:41:19 +01:00
Michal Čihař bca3574cf3 Use absolute path here
Issue #95

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-11-30 11:34:21 +01:00
Michal Čihař c5c62ee24b Create secret and user configs in /etc/phpmyadmin
Fixes #95

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-11-30 11:17:43 +01:00
Michal Čihař 78f2603e29 Remove more not needed doc files
Fixes #79

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-11-30 11:16:40 +01:00
Michal Čihař 0715366ee3 Add version label
Issue #85

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-11-28 16:39:38 +01:00
Sam Mousa a4dc5b36cd Added some missing php extensions. 2016-11-28 10:48:41 +01:00
Sam Mousa f626ed635b Updated to use alpine edge and php7. 2016-11-28 10:40:43 +01:00
Michal Čihař 2a761b2a73 Increase upload size limit to 512MB
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-11-28 10:39:25 +01:00
Michal ČihařandGitHub f544b5ca97 Merge pull request #92 from nijel/master
Try to reorder commands for better Docker layer caching
2016-11-28 10:23:19 +01:00
Michal ČihařandGitHub d53aadc0bb Merge pull request #93 from nijel/doc-cleanup
Cleanup documentation folder
2016-11-28 10:23:12 +01:00
Michal Čihař f581555bcf Move all configuration to /etc
* configuration is now in /etc
* reorder commands for better Docker layer caching

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-11-28 10:19:52 +01:00
Michal Čihař 5cef68749a Cleanup documentation folder
We really do not need documentation source in the Docker image.

Fixes #79

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-11-28 10:12:56 +01:00
Michal ČihařandGitHub 6c1410cbef Merge pull request #91 from nijel/master
Split setting variable from export
2016-11-28 09:37:14 +01:00
Michal Čihař 352e5fe6ed Split setting variable from export
This way we can correctly get error from the mkdir.

Fixes #86

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-11-28 09:31:58 +01:00
Michal ČihařandGitHub c81443abd1 Merge pull request #90 from vancepym/patch-1
Bump version to 4.6.5.1
2016-11-28 09:29:51 +01:00
vancepymandGitHub 7177389b20 Bump version to 4.6.5.1 2016-11-28 13:35:17 +08:00
Michal ČihařandGitHub 3142368a07 Merge pull request #89 from asolopovas/patch-1
Cancel removal of /www/sql
2016-11-25 15:23:28 +01:00
Andrius SolopovasandGitHub a017968642 Cancel removal of /www/sql
Please do not delete /www/sql folder as it contains create_tables.sql file that creates pma tables and phpmyadmin db for configuration storage
2016-11-24 21:45:58 +00:00
Michal Čihař 9b115208c7 Simplify password generating
- remove not needed cat, this makes it consume less entropy due to less
  buffering
- use $() instead of `` in shell

Fixes #78

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-11-21 16:09:28 +01:00
Michal Čihař 2e371a1cb5 Simplify expression evaluation
Issue #87

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-11-21 16:07:48 +01:00
Michal Čihař af486daba0 Add quotes around parameters
Issue #87

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-11-21 16:07:45 +01:00
Michal Čihař a53f732a77 Use URL variable instead of hardcoding it
Issue #87

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-11-21 16:07:42 +01:00
Michal Čihař 50f822a1c9 Remove more not needed files
Fixes #78

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-10-25 10:45:00 +02:00
Michal Čihař 101ce17f0d Document where to report issues
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-10-18 13:14:37 +02:00
Michal ČihařandGitHub f9c263baf2 Merge pull request #77 from nijel/nginx-setup
Improve nginx setup
2016-10-18 13:07:18 +02:00
Michal ČihařandGitHub 71bf1edde3 Merge pull request #74 from nijel/userconfig
Fix user configuration and add tests for it
2016-10-18 13:03:57 +02:00
Michal Čihař 29bcc43956 Allow only GET, HEAD and POST methods
Fixes #64

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-10-18 13:03:27 +02:00
Michal Čihař 379a7df699 Avoid extending try_files too much
Fixes #63

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-10-18 13:03:27 +02:00
Michal Čihař ab9d56ffc1 Deny access to all hidden files
Fixes #67

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-10-18 13:03:27 +02:00
Michal ČihařandGitHub e3abc1a5bd Merge pull request #76 from nijel/php-name
Avoid encoding PHP version in socket or log name
2016-10-18 12:58:12 +02:00
Michal ČihařandGitHub 1807d08963 Merge pull request #75 from nijel/opcache
Optimize PHP opcache settings
2016-10-18 12:56:39 +02:00
Michal Čihař a4ddcb67ce Add tests for user configuration override
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-10-18 12:55:53 +02:00
Michal Čihař b2c5075876 Avoid encoding PHP version in socket or log name
Fixes #68

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-10-18 12:39:18 +02:00
Michal Čihař 9ddd36cd25 Optimize PHP opcache settings
- opcache.save_comments=0 to avoid storing comments which we do not need
- opcache.validate_timestamps=0 the timestamps validation should not be
  needed as container is restarted on change
- fixes #71

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-10-18 12:33:58 +02:00
Michal Čihař 6ab1e50550 Limit waiting for container to come up
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-10-18 12:26:41 +02:00
Michal Čihař cd02b8d305 Move config.user.inc.php to /www
It needs to be stored in a location allowed by open_basedir.

Fixes #73

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-10-18 12:09:58 +02:00
Michal ČihařandGitHub 465ecb08b3 Merge pull request #72 from asosso/master
Adding PMA_VERBOSE and PMA_VERBOSES environment variables
2016-10-04 16:19:38 +02:00
Andrea Sosso 07afa363d7 Adding PMA_VERBOSE and PMA_VERBOSES environment variables 2016-10-04 15:25:13 +02:00
Michal Čihař 8a3544a20a Reduce supervisor loglevel
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-27 09:18:08 +02:00
Michal Čihař 0a9d050db1 Allow access to /tmp
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-26 10:01:33 +02:00
Michal Čihař edce528acc Can not use armored PGP for keyring
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-26 09:25:18 +02:00
Michal Čihař 7b9abff0ff Deny access to libraries and templates
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-26 09:18:00 +02:00
Michal Čihař ad4b811c44 Set loglevel for PHP-FPM
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-26 09:15:27 +02:00
Michal Čihař 0fd626c1f6 Enable open_basedir in PHP
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-26 09:15:15 +02:00
Michal Čihař e415b21140 Make listen mode more secure
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-26 09:03:12 +02:00
Michal Čihař d935ec82f8 Include only Isaac's key for verification
There is no need to have all the keys here.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-26 09:01:51 +02:00
Michal Čihař fc12c997ef Allow to specify verbose names
Fixes #54

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-22 09:55:02 +02:00
Michal Čihař 55a4594325 Fix path name
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-22 09:40:13 +02:00
Michal Čihař 90551173a8 Use https links
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-22 09:08:01 +02:00
Michal Čihař b3eb5ffd23 Use SHA-1 for session hash
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-22 08:50:17 +02:00
Michal Čihař 3554ecfe19 Do not expose nginx version
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-22 08:49:34 +02:00
Michal Čihař 000827ba7a Move version we have requested
This makes the code easier to understand and avoids possible MITM on
download to push older version.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-22 08:45:21 +02:00
Michal Čihař 0ba8cd2bc8 Add missing find -exec separator
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-20 13:20:44 +02:00
Michal Čihař f7319feabf Fix line breaks
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-20 13:14:06 +02:00
Michal Čihař ab8caa4dd7 Adjust permissions of /www
Issue #52

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-20 13:01:26 +02:00
Michal Čihař 8c13128da9 Correctly prepare log for FPM
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-20 12:07:58 +02:00
Michal Čihař df1677c26e Display supervisor log on error
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-20 12:01:08 +02:00
Michal Čihař dc56655368 Move PHP socket
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-20 11:56:05 +02:00
Michal Čihař 8496f8fd25 Start PHP-FPM as nobody
Issue #52

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-20 11:47:42 +02:00
Michal Čihař e2a6eb627e List processes at the end of test
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-20 11:41:33 +02:00
Michal Čihař 233e07cd7b Be less strict on version
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-16 13:10:31 +02:00
Michal Čihař bae2c00e12 State which Alpine version to use
The package names could change (as did in past with php) so let's
specify exact version.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-16 12:32:33 +02:00
Michal Čihař 8fd34e6581 Add docker layers badge
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-01 12:46:56 +02:00
Michal Čihař 63557d61e9 Revert "Remove not used files from packages"
This reverts commit 38e99339ce.

It seams to break startup and does not really save anything reasonable.
2016-08-29 11:52:36 +02:00
Michal Čihař bac44a4dbb Ignore test files for docker
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 10:58:20 +02:00
Michal Čihař f5fb1e42f9 Increase upload_max_filesize to be in sync with other settings
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 10:54:30 +02:00
Michal Čihař 38e99339ce Remove not used files from packages
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 10:51:35 +02:00
Michal Čihař 961aa4ce9a Remove not needed cleanup
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 10:45:28 +02:00
Michal Čihař fa5c90cae4 Remove php cli, we do not need it
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 10:40:07 +02:00
Michal Čihař 923f581fa9 Remove openlayers source from the image as well
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 10:35:52 +02:00
Michal Čihař 9a78cb3d33 Better cleanup of produced image
- remove setup script
- remove tests
- remove SQL scripts

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 10:32:39 +02:00
Michal Čihař 23b9a14189 Remove no longer used variables
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 10:16:02 +02:00
Michal Čihař 341bc4965d Simplify tests
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 09:52:49 +02:00
Michal Čihař d6060e96b5 More verbose reporting in case of error
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 09:41:40 +02:00
Michal Čihař 454dfd47ed Select import form by name
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 09:35:35 +02:00
Michal Čihař 47eaf4cb6d Add test for arbitrary server on docker-compose
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 09:33:33 +02:00
Michal Čihař b80eea10a2 Do not try to use arbitrary server when not enabled
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 09:32:52 +02:00
Michal Čihař f6ae557f95 Igore robots.txt while testing
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 09:29:45 +02:00
Michal Čihař d5895311c0 Fix params, correctly handle error
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 09:23:08 +02:00
Michal Čihař 1c0936f359 Improve server testing
- Use python-mechanize based script
- Test file upload as well

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 09:17:35 +02:00
Michal Čihař cc72b8a432 Really test that arbitrary server settings works
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 08:18:03 +02:00
Michal Čihař 5acaf20477 Whitespace cleanup in nginx configuration
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 08:13:54 +02:00
Michal Čihař 7f07a54e26 Configure temp file for bigger uploads
Issue #32

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 08:13:16 +02:00
Michal Čihař 4b12fdda7c Disable fastcgi buffering
We can immedieately send out fastcgi response.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 08:11:48 +02:00
Michal Čihař 0ffb4af4c4 Increase maximal execution time
- This is needed to allow big SQL uploads.
- Also keep in sync nginx and PHP limit.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 08:06:29 +02:00
Michal Čihař a76914f87d Increase nginx buffers and maximal request size
We can expect people posting big SQL files, so let's allow 128M.

Issue #32

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 08:05:12 +02:00
Michal Čihař 0c3251bf9e Disable environment cleanup on PHP FPM
We pass settings by environment, so it has to be preserved.

Fixes #49

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-28 19:21:40 +02:00
Michal Čihař 8bec114378 Adjust description to match current setup
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-28 10:21:52 +02:00
Michal Čihař d6be2b9f1a Fix syntax
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-28 10:12:39 +02:00
Michal Čihař 32d4928e0a Always test against latest versions of databases
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-28 10:11:52 +02:00
Michal Čihař 978bdb4b25 Display logs only on error
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-28 10:09:40 +02:00
Michal Čihař 5b5edcafb1 Remove debugging code
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-28 10:08:17 +02:00
Michal Čihař d784d12452 Fix permissions on start
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-28 10:02:57 +02:00
Michal Čihař 84493eb5e4 Fix sessions permissions
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-28 09:54:34 +02:00
Michal Čihař 91b5bd0fcd Merge branch 'nginx' 2016-08-28 09:47:36 +02:00
Michal Čihař a1c139f901 Debug failures
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-28 09:47:09 +02:00
Michal ČihařandGitHub 507105ec70 Merge pull request #48 from nijel/nginx
Use supervisor +  nginx + php-fpm
2016-08-28 09:18:28 +02:00
Michal Čihař feb1c92581 Remove debugging settings
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-28 09:17:59 +02:00
Michal Čihař d12c0493ee Improve sessions configuration
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-28 09:10:37 +02:00
Michal Čihař 00ff178fd1 Add php.ini configuration file
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-28 09:09:03 +02:00
Michal Čihař b611c5adde Display logs at the end of test
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-27 13:29:48 +02:00
Michal Čihař 1b2ff90941 Better name for docker-compose
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-27 13:24:55 +02:00
Michal Čihař 5cb63716a7 Move tests to separate script
We repeat same for every container anyway.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-27 13:24:55 +02:00
Michal Čihař d70630f09a Initial attempt to use nginx + php-fpm
Replaced php built in server with supervisord + nginx + php-fpm.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-27 13:24:55 +02:00
Michal Čihař 9e0529c6f5 Revert "Remove PMA_ABSOLUTE_URI as it is no longer needed with 4.6"
This reverts commit 812590e038.

Fixes #40

Please note that the setting will take no effect till phpMyAdmin 4.6.5.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-17 15:43:28 +02:00
Michal Čihař e7d5c0f075 Add comments to Dockerfile
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-17 11:00:34 +02:00
Michal Čihař 690acf54dd Document what credentials are used, it seems to be common problem of users
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-17 10:36:42 +02:00
Michal Čihař 901156a7eb Update to 4.6.4
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-17 10:31:36 +02:00
Michal Čihař ced6ab371a Disable apk cache for removal
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-08 14:09:08 +02:00
Michal ČihařandGitHub 9d258fed4f Merge pull request #46 from nijel/master
Specify version in variable
2016-08-08 14:08:40 +02:00
Michal Čihař e59a8bab47 Specify version in variable
This way we can reproduce build of tags, with latest approach used so
far, you would always get the latest version even when building older
tag.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-08 14:05:53 +02:00
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
Michal Čihař ae243b8077 Add test for sessions after shutdown (issue #32)
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-06 10:16:08 +02:00
Michal Čihař 96e3c94c6b Try testing docker compose as well
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-06 10:10:28 +02:00
Michal Čihař 23cb076766 Use persistent volume for sessions
Issue #32

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-06 10:03:35 +02:00
Michal Čihař 15ca16c9d0 Change deps to php5
We would really prefer php7, but it's not there and php packages got
renamed to php5

Issue #31

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-05-27 13:48:21 +02:00
Michal Čihař 12997cea47 Document where bug reports on phpMyAdmin should go
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-04-27 09:59:50 +02:00
Michal Čihař 249e10decc Add comment why is there edge
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-04-20 08:34:17 +02:00
Michal Čihař 6dd6b90902 Base on alpine:edge to get DNS fixes
See https://twitter.com/thockin/status/704909611279781888 and
https://github.com/gliderlabs/docker-alpine/issues/8. This will be fixed
in 3.4, so at that point we can switch back to using stable.

Fixes #23 (DNS issues)
Fixes #27 (Kubernetes support)

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-04-20 08:31:53 +02:00
Michal Čihař 4893806cde More links to docker hub
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-04-20 08:31:11 +02:00
Michal Čihař f313ce3a84 Add docker badge
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-04-20 08:24:42 +02:00
25 changed files with 7973 additions and 54 deletions
+1
View File
@@ -4,3 +4,4 @@ docker-compose.testing.yml
README.md
LICENSE
Makefile
testing
+4
View File
@@ -0,0 +1,4 @@
This repository contains only Docker integration of phpMyAdmin.
Please do not report bugs in phpMyAdmin itself here, use
<https://github.com/phpmyadmin/phpmyadmin/issues> instead.
+23
View File
@@ -0,0 +1,23 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale Issue or Pull Request is closed
daysUntilClose: 7
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- pinned
- security
# Label to use when marking as stale
staleLabel: wontfix
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when removing the stale label. Set to `false` to disable
unmarkComment: false
# Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable
closeComment: false
# Limit to only `issues` or `pulls`
only: pulls
+25 -16
View File
@@ -1,36 +1,45 @@
dist: trusty
sudo: required
services:
- docker
language: python
python:
- "2.7"
env:
matrix:
- DB=mysql:5.7
- DB=mariadb:10.0
- DB=mysql:latest
- DB=mariadb:latest
before_install:
- docker run --name db_server -e MYSQL_ROOT_PASSWORD=my-secret-pw -d $DB
- export TESTSUITE_PASSWORD=`openssl rand -base64 30`
- docker run --name db_server -e MYSQL_ROOT_PASSWORD=$TESTSUITE_PASSWORD -d $DB
install:
- pip install mechanize html5lib
script:
# Build image
- docker build -t phpmyadmin/phpmyadmin .
# Test for single database
- docker run --name testadmin -d --link db_server:db -p 9090:80 phpmyadmin/phpmyadmin
- docker ps -a
- curl http://127.0.0.1:9090/ | grep -q input_password
- curl --cookie-jar /tmp/cj --location -d pma_username=root -d pma_password=my-secret-pw -d server=1 http://127.0.0.1:9090/ | grep -r 'db via TCP'
- ./testing/test-docker.sh testadmin 9090
# Test for single database using env
- docker run --name envadmin -d --link db_server:db2 -e PMA_HOST=db2 -p 6060:80 phpmyadmin/phpmyadmin
- docker ps -a
- curl http://127.0.0.1:6060/ | grep -q input_password
- curl --cookie-jar /tmp/cj --location -d pma_username=root -d pma_password=my-secret-pw -d server=1 http://127.0.0.1:6060/ | grep -r 'db2 via TCP'
- ./testing/test-docker.sh envadmin 6060
# Test for arbitrary database
- docker run --name arbitraryadmin -d --link db_server:db -e PMA_ARBITRARY=1 -p 7070:80 phpmyadmin/phpmyadmin
- docker ps -a
- curl http://127.0.0.1:7070/ | grep -q input_password
- curl --cookie-jar /tmp/cj --location -d pma_servername=db -d pma_username=root -d pma_password=my-secret-pw -d server=1 http://127.0.0.1:7070/ | grep -r 'db via TCP'
- docker run --name arbitraryadmin -d --link db_server:db3 -e PMA_ARBITRARY=1 -p 7070:80 phpmyadmin/phpmyadmin
- ./testing/test-docker.sh arbitraryadmin 7070 db3
# Test for arbitrary database with user config
- docker run --name userconfigadmin -d --link db_server:db3 -v `readlink -f ./testing/config.test.inc.php`:/etc/phpmyadmin/config.user.inc.php -p 7080:80 phpmyadmin/phpmyadmin
- ./testing/test-docker.sh userconfigadmin 7080 db3
# Test docker-compose
- docker-compose up -d
- docker ps -a
- curl http://127.0.0.1:8080/ | grep -q input_password
- docker-compose -f docker-compose.yml -f docker-compose.db.yml up -d
- ./testing/test-docker.sh phpmyadmin 8080 db_server
- docker-compose stop
# Run tests in testing container
- docker-compose -f docker-compose.testing.yml up -d phpmyadmin
- ./testing/wait-for-testing.sh
+58 -9
View File
@@ -1,18 +1,67 @@
FROM alpine
FROM php:7.2-fpm-alpine
RUN apk add --no-cache php-cli php-mysqli php-ctype php-xml php-gd php-zlib php-openssl php-curl php-opcache php-json php-mcrypt curl
# Install dependencies
RUN apk add --no-cache --virtual .build-deps \
bzip2-dev \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
libwebp-dev \
libxpm-dev \
; \
\
docker-php-ext-configure gd --with-freetype-dir=/usr --with-jpeg-dir=/usr --with-webp-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr; \
docker-php-ext-install bz2 gd mysqli opcache zip; \
\
runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --virtual .phpmyadmin-phpexts-rundeps $runDeps; \
apk del .build-deps; \
apk add --no-cache nginx supervisor
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/
# Include keyring to verify download
COPY phpmyadmin.keyring /
COPY config.inc.php /www/
# Copy configuration
COPY etc /etc/
# Copy main script
COPY run.sh /run.sh
RUN chmod u+rwx /run.sh
# Calculate download URL
ENV VERSION 4.8.0
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.gz
LABEL version=$VERSION
# Download tarball, verify it using gpg and extract
RUN set -x \
&& GNUPGHOME="$(mktemp -d)" \
&& export GNUPGHOME \
&& apk add --no-cache curl gnupg \
&& curl --output phpMyAdmin.tar.gz --location $URL \
&& curl --output phpMyAdmin.tar.gz.asc --location $URL.asc \
&& gpgv --keyring /phpmyadmin.keyring phpMyAdmin.tar.gz.asc phpMyAdmin.tar.gz \
&& apk del --no-cache curl gnupg \
&& rm -rf "$GNUPGHOME" \
&& tar xzf phpMyAdmin.tar.gz \
&& rm -f phpMyAdmin.tar.gz phpMyAdmin.tar.gz.asc \
&& mv phpMyAdmin-$VERSION-all-languages /www \
&& rm -rf /www/setup/ /www/examples/ /www/test/ /www/po/ /www/composer.json /www/RELEASE-DATE-$VERSION \
&& sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /www/libraries/vendor_config.php \
&& chown -R root:nobody /www \
&& find /www -type d -exec chmod 750 {} \; \
&& find /www -type f -exec chmod 640 {} \;
# Add directory for sessions to allow session persistence
RUN mkdir /sessions
# We expose phpMyAdmin on port 80
EXPOSE 80
ENV PHP_UPLOAD_MAX_FILESIZE=64M \
PHP_MAX_INPUT_VARS=2000
ENTRYPOINT [ "/run.sh" ]
CMD ["phpmyadmin"]
+64 -5
View File
@@ -1,12 +1,37 @@
# Official phpMyAdmin Docker image
Run phpMyAdmin with Alpine and PHP built in web server.
Run phpMyAdmin with Alpine, supervisor, nginx and PHP FPM.
[![Build Status](https://travis-ci.org/phpmyadmin/docker.svg?branch=master)](https://travis-ci.org/phpmyadmin/docker)
[![Docker Pulls](https://img.shields.io/docker/pulls/phpmyadmin/phpmyadmin.svg)][hub]
[![Docker Stars](https://img.shields.io/docker/stars/phpmyadmin/phpmyadmin.svg)][hub]
[![Docker Layers](https://images.microbadger.com/badges/image/phpmyadmin/phpmyadmin.svg)](https://microbadger.com/images/phpmyadmin/phpmyadmin "Get your own image badge on microbadger.com")
[![Docker Version](https://images.microbadger.com/badges/version/phpmyadmin/phpmyadmin.svg)](https://microbadger.com/images/phpmyadmin/phpmyadmin "Get your own version badge on microbadger.com")
All following examples will bring you phpMyAdmin on `http://localhost:8080`
where you can enjoy your happy MySQL administration.
## Credentials
phpMyAdmin does use MySQL server credential, please check the corresponding
server image for information how it is setup.
The official MySQL and MariaDB use following environment variables to define these:
* `MYSQL_ROOT_PASSWORD` - This variable is mandatory and specifies the password that will be set for the `root` superuser account.
* `MYSQL_USER`, `MYSQL_PASSWORD` - These variables are optional, used in conjunction to create a new user and to set that user's password.
## Docker hub tags
You can use following tags on Docker hub:
* `latest` - latest stable release
* `4.6` - latest stable release from the 4.6 branch
* `4.7` - latest stable release from the 4.7 branch
* `edge` - bleeding edge docker image (contains stable phpMyAdmin, but the Docker image changes might not yet be fully tested)
* `edge-4.7` - bleeding edge docker image + latest snapshots from 4.7 branch
* `edge-4.8` - bleeding edge docker image + latest snapshots from 4.8 branch (currently master)
## Usage with linked server
@@ -31,7 +56,7 @@ docker run --name myadmin -d -e PMA_HOST=dbhost -p 8080:80 phpmyadmin/phpmyadmin
You can use arbitrary servers by adding ENV variable `PMA_ARBITRARY=1` to the startup command:
```
docker run --name myadmin -d --link mysql_db_server:db -p 8080:80 -e PMA_ARBITRARY=1 phpmyadmin/phpmyadmin
docker run --name myadmin -d -e PMA_ARBITRARY=1 -p 8080:80 phpmyadmin/phpmyadmin
```
## Usage with docker-compose and arbitrary server
@@ -45,18 +70,52 @@ Using the docker-compose.yml from https://github.com/phpmyadmin/docker
docker-compose up -d
```
## Run the E2E tests with docker-compose
You can run the E2E tests with the local test environment by running MariaDB/MySQL databases. Adding ENV variable `PHPMYADMIN_RUN_TEST=true` already added on docker-compose file. Simply run:
Using the docker-compose.testing.yml from https://github.com/phpmyadmin/docker
```
docker-compose -f docker-compose.testing.yml up phpmyadmin
```
## 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:/etc/phpmyadmin/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:/etc/phpmyadmin/config.user.inc.php phpmyadmin/phpmyadmin
```
See the following links for config file information.
https://docs.phpmyadmin.net/en/latest/config.html#config
https://docs.phpmyadmin.net/en/latest/setup.html
## 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.
## Environment variables summary
* ``PMA_ARBITRARY`` - when set to 1 connection to the arbitrary server will be allowed
* ``PMA_HOST`` - define address/host name of the MySQL server
* ``PMA_VERBOSE`` - define verbose name of the MySQL server
* ``PMA_PORT`` - define port of the MySQL server
* ``PMA_HOSTS`` - define comma separated list of address/host names of the MySQL servers
* ``PMA_VERBOSES`` - define comma separated list of verbose names of the MySQL servers
* ``PMA_PORTS`` - define comma separated list of ports 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/
Please report any issues with the Docker container to https://github.com/phpmyadmin/docker/issues
+3
View File
@@ -0,0 +1,3 @@
phpmyadmin:
external_links:
- db_server:db
+27 -6
View File
@@ -1,8 +1,29 @@
phpmyadmin:
image: phpmyadmin/phpmyadmin:testing
container_name: myadmin
version: '2'
services:
mariadb:
image: mariadb:latest
container_name: phpmyadmin_testing_mariadb
environment:
- PMA_ARBITRARY=1
restart: always
- MYSQL_ROOT_PASSWORD=test123
mysql:
image: mysql:latest
container_name: phpmyadmin_testing_mysql
environment:
- MYSQL_ROOT_PASSWORD=test123
phpmyadmin:
build:
context: testing/
container_name: phpmyadmin_testing
volumes:
- /sessions
ports:
- 8090:80
- 8090:80
environment:
- PMA_ARBITRARY=1
- TESTSUITE_PASSWORD=test123
depends_on:
- mariadb
- mysql
+3 -1
View File
@@ -1,8 +1,10 @@
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: myadmin
container_name: phpmyadmin
environment:
- PMA_ARBITRARY=1
restart: always
ports:
- 8080:80
volumes:
- /sessions
+132
View File
@@ -0,0 +1,132 @@
user nobody;
worker_processes 4;
daemon off;
pid /nginx.pid;
error_log /var/log/nginx-error.log;
events {
worker_connections 1024;
}
http {
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
application/atom+xml atom;
application/rss+xml rss;
}
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
client_body_timeout 12;
client_header_timeout 12;
keepalive_timeout 15;
send_timeout 10;
server_tokens off;
client_body_buffer_size 512K;
client_body_temp_path /var/nginx/client_body_temp;
client_header_buffer_size 16k;
client_max_body_size 512M;
large_client_header_buffers 4 8k;
gzip on;
gzip_comp_level 2;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain application/x-javascript text/xml text/css application/xml;
access_log off;
server {
listen 80 default_server;
server_name _;
root /www;
index index.php index.html index.htm;
charset utf-8;
if ($request_method !~ ^(GET|HEAD|POST)$ ) {
return 405;
}
location / {
try_files $uri $uri/ =404;
}
location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
expires 365d;
}
location ~ \.php$ {
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php/php-fpm.sock;
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# Check that the PHP script exists before passing it
try_files $fastcgi_script_name =404;
# Bypass the fact that try_files resets $fastcgi_path_info
# see: https://trac.nginx.org/nginx/ticket/321
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
fastcgi_read_timeout 1200;
fastcgi_buffering off;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
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_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 REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
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;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
}
location ~ /\. {
deny all;
}
location ~ /(libraries|templates) {
deny all;
}
}
}
+17
View File
@@ -0,0 +1,17 @@
[global]
error_log = /var/log/php-fpm.log
log_level = warning
[www]
user = nobody
group = nobody
listen = /var/run/php/php-fpm.sock
listen.mode = 0660
chdir = /www
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
catch_workers_output = Yes
clear_env = No
+1918
View File
File diff suppressed because it is too large Load Diff
@@ -1,20 +1,24 @@
<?php
require('./config.secret.inc.php');
require('/etc/phpmyadmin/config.secret.inc.php');
/* Ensure we got the environment */
$vars = array(
'PMA_ARBITRARY',
'PMA_HOST',
'PMA_HOSTS',
'PMA_VERBOSE',
'PMA_VERBOSES',
'PMA_PORT',
'PMA_PORTS',
'PMA_USER',
'PMA_PASSWORD',
'PMA_ABSOLUTE_URI'
);
foreach ($vars as $var) {
if (!isset($_ENV[$var]) && getenv($var)) {
$_ENV[$var] = getenv($var);
$env = getenv($var);
if (!isset($_ENV[$var]) && $env !== false) {
$_ENV[$var] = $env;
}
}
@@ -36,28 +40,44 @@ $hosts = array('db');
/* Set by environment */
if (!empty($_ENV['PMA_HOST'])) {
$hosts = array($_ENV['PMA_HOST']);
$verbose = array($_ENV['PMA_VERBOSE']);
$ports = array($_ENV['PMA_PORT']);
} elseif (!empty($_ENV['PMA_HOSTS'])) {
$hosts = explode(',', $_ENV['PMA_HOSTS']);
$verbose = explode(',', $_ENV['PMA_VERBOSES']);
$ports = explode(',', $_ENV['PMA_PORTS']);
}
/* Server settings */
for ($i = 1; isset($hosts[$i - 1]); $i++) {
$cfg['Servers'][$i]['host'] = $hosts[$i - 1];
if (isset($_ENV['PMA_PORT'])) {
$cfg['Servers'][$i]['port'] = $_ENV['PMA_PORT'];
if (isset($verbose[$i - 1])) {
$cfg['Servers'][$i]['verbose'] = $verbose[$i - 1];
}
if (isset($_ENV['PMA_USER'])) {
if (isset($ports[$i - 1])) {
$cfg['Servers'][$i]['port'] = $ports[$i - 1];
}
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;
$cfg['Servers'][$i]['password'] = isset($_ENV['PMA_PASSWORD']) ? $_ENV['PMA_PASSWORD'] : '';
} else {
$cfg['Servers'][$i]['auth_type'] = 'cookie';
}
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;
}
/*
* Revert back to last configured server to make
* it easier in config.user.inc.php
*/
$i--;
/* Uploads setup */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
/* Include User Defined Settings Hook */
if (file_exists('/etc/phpmyadmin/config.user.inc.php')) {
include('/etc/phpmyadmin/config.user.inc.php');
}
+12
View File
@@ -0,0 +1,12 @@
[program:nginx]
command=nginx -c /etc/nginx.conf
autostart=true
autorestart=true
priority=2
startretries=3
stopwaitsecs=10
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
+13
View File
@@ -0,0 +1,13 @@
[program:php-fpm]
command=php-fpm --nodaemonize --fpm-config /etc/php-fpm.conf -c /etc/php.ini
user=nobody
autostart=true
autorestart=true
priority=1
startretries=3
stopwaitsecs=10
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
Binary file not shown.
Regular → Executable
+17 -9
View File
@@ -1,14 +1,22 @@
#!/bin/sh
set -x
if [ ! -f /www/config.secret.inc.php ] ; then
cat > /www/config.secret.inc.php <<EOT
if [ ! -f /etc/phpmyadmin/config.secret.inc.php ] ; then
cat > /etc/phpmyadmin/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'] = '$(tr -dc 'a-zA-Z0-9~!@#$%^&*_()+}{?></";.,[]=-' < /dev/urandom | fold -w 32 | head -n 1)';
EOT
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
if [ ! -f /etc/phpmyadmin/config.user.inc.php ] ; then
touch /etc/phpmyadmin/config.user.inc.php
fi
mkdir -p /var/nginx/client_body_temp
chown nobody:nobody /sessions /var/nginx/client_body_temp
mkdir -p /var/run/php/
chown nobody:nobody /var/run/php/
touch /var/log/php-fpm.log
chown nobody:nobody /var/log/php-fpm.log
if [ "$1" = 'phpmyadmin' ]; then
exec supervisord --nodaemon --configuration="/etc/supervisord.conf" --loglevel=info
fi
+10
View File
@@ -0,0 +1,10 @@
# Testing image for phpMyAdmin
FROM phpmyadmin/phpmyadmin
# Install test dependencies
RUN apk add --no-cache curl py2-pip
RUN pip install mechanize html5lib
COPY test-mariadb.ini test-mysql.ini /etc/supervisor.d/
COPY phpmyadmin_test.py test-docker.sh world.sql /
+2
View File
@@ -0,0 +1,2 @@
<?php
$cfg['AllowArbitraryServer'] = true;
+73
View File
@@ -0,0 +1,73 @@
#!/usr/bin/env python
import argparse
import os
import re
import sys
import mechanize
def test_content(match, content):
if not match in content:
print(content)
raise Exception('{0} not found in content!'.format(match))
def test_phpmyadmin(url, username, password, server=None, sqlfile=None):
if sqlfile is None:
if os.path.exists('/world.sql'):
sqlfile = '/world.sql'
elif os.path.exists('./world.sql'):
sqlfile = './world.sql'
else:
sqlfile = './testing/world.sql'
br = mechanize.Browser()
# Ignore robots.txt
br.set_handle_robots(False)
# Login page
br.open(url)
# Fill login form
br.select_form('login_form')
br['pma_username'] = username
br['pma_password'] = password
if server is not None:
br['pma_servername'] = server
# Login and check if loggged in
response = br.submit()
test_content('Server version', response.read())
# Open server import
response = br.follow_link(text_regex=re.compile('Import'))
test_content('OpenDocument Spreadsheet', response.read())
# Upload SQL file
br.select_form('import')
br.form.add_file(open(sqlfile), 'text/plain', sqlfile)
response = br.submit()
test_content('5326 queries executed', response.read())
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--url', required=True)
parser.add_argument('--username', required=True)
parser.add_argument('--password', required=True)
parser.add_argument('--server')
parser.add_argument('--sqlfile', default=None)
args = parser.parse_args()
test_phpmyadmin(
args.url,
args.username,
args.password,
args.server,
args.sqlfile
)
if __name__ == '__main__':
main()
+94
View File
@@ -0,0 +1,94 @@
#!/bin/sh
NAME="$1"
if [ -n "$2" ] ; then
PORT="$2"
TESTSUITE_PORT=$2
fi
if [ -n "$3" ] ; then
SERVER="--server $3"
PMA_HOST=$3
else
SERVER=''
fi
# Set PHPMyAdmin environment
PHPMYADMIN_HOSTNAME=${TESTSUITE_HOSTNAME:=localhost}
PHPMYADMIN_PORT=${TESTSUITE_PORT:=80}
PHPMYADMIN_URL=http://$PHPMYADMIN_HOSTNAME:$PORT/
# Color text output
GREEN="\033[0;32m"
RED="\033[0;31m"
NC="\033[0m" # No Color
ret=0
# Check if script is running inside container
if [ -f /.dockerenv ] ; then
echo "Tests running inside container..."
# Set database environment
PHPMYADMIN_DB_HOSTNAME=${PMA_HOST:=localhost}
PHPMYADMIN_DB_PORT=${PMA_PORT:=3306}
PHPMYADMIN_DB_URL=http://$PHPMYADMIN_DB_HOSTNAME:$PHPMYADMIN_DB_PORT/
# Wait for database to start
TIMEOUT=0
while ! curl "$PHPMYADMIN_DB_URL" &>/dev/null; do
echo "Waiting for ${PHPMYADMIN_DB_HOSTNAME} database start..."
sleep 10
TIMEOUT=$((TIMEOUT + 1))
if [ $TIMEOUT -gt 3 ] ; then
echo "Failed to connect ${PHPMYADMIN_DB_HOSTNAME} database!"
echo "Result of ${PHPMYADMIN_DB_HOSTNAME} tests: ${RED}FAILED${NC}"
ret=1
exit 1
fi
done
else
echo "Tests running outside container..."
docker ps -a
COMMAND_HOST="docker exec ${NAME}"
fi
# Wait for container to start
TIMEOUT=0
while ! $COMMAND_HOST ps aux | grep -q nginx ; do
echo "Waiting for PHPMyAdmin start..."
sleep 1
TIMEOUT=$((TIMEOUT + 1))
if [ $TIMEOUT -gt 10 ] ; then
echo "Failed to connect PHPMyAdmin!"
echo "Result of ${PHPMYADMIN_DB_HOSTNAME} tests: ${RED}FAILED${NC}"
ret=1
exit 1
fi
done
# Perform tests
if [ $ret -eq 0 ] ; then
if [ -f /phpmyadmin_test.py ] ; then
FILENAME=/phpmyadmin_test.py
elif [ -f ./phpmyadmin_test.py ] ; then
FILENAME=./phpmyadmin_test.py
else
FILENAME=./testing/phpmyadmin_test.py
fi
python $FILENAME --url "$PHPMYADMIN_URL" --username root --password $TESTSUITE_PASSWORD $SERVER
ret=$?
fi
# Show debug output in case of failure
if [ $ret -ne 0 ] ; then
curl "$PHPMYADMIN_URL"
$COMMAND_HOST ps faux
$COMMAND_HOST cat /var/log/php-fpm.log
$COMMAND_HOST cat /var/log/nginx-error.log
$COMMAND_HOST cat /var/log/supervisord.log
echo "Result of ${PHPMYADMIN_DB_HOSTNAME} tests: ${RED}FAILED${NC}"
exit $ret
fi
echo "Result of ${PHPMYADMIN_DB_HOSTNAME} tests: ${GREEN}SUCCESS${NC}"
+11
View File
@@ -0,0 +1,11 @@
[program:test-mariadb]
command=/test-docker.sh test 80 mariadb
autostart=true
autorestart=false
priority=3
startretries=1
stopwaitsecs=20
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
+11
View File
@@ -0,0 +1,11 @@
[program:test-mysql]
command=/test-docker.sh test 80 mysql
autostart=true
autorestart=false
priority=3
startretries=1
stopwaitsecs=20
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
+32
View File
@@ -0,0 +1,32 @@
#!/bin/sh
# Helper script to wait for testing inside container completes
# Needs running docker-compose container based on docker-compose.testing.yml
GREEN="\033[0;32m"
RED="\033[0;31m"
NC="\033[0m" # No Color
TIMEOUT=0
sleep 5
while [ `docker-compose -f docker-compose.testing.yml logs phpmyadmin | grep -c 'Result of \(mysql\|mariadb\) tests'` -lt 2 ] ; do
sleep 1
TIMEOUT=$(($TIMEOUT + 1))
if [ $TIMEOUT -gt 20 ] ; then
docker-compose -f docker-compose.testing.yml logs phpmyadmin
echo "${RED}Timeout!${NC}"
exit 1
fi
done
if [ `docker-compose -f docker-compose.testing.yml logs phpmyadmin | grep -c 'Result of \(mysql\|mariadb\) tests.*SUCCESS'` -lt 2 ] ; then
docker-compose -f docker-compose.testing.yml logs phpmyadmin
echo "${RED}Failed${NC}"
exit 2
fi
docker-compose -f docker-compose.testing.yml logs phpmyadmin
echo "${GREEN}Success${NC}"
exit 0
+5395
View File
File diff suppressed because it is too large Load Diff