Merge pull request #92 from nijel/master

Try to reorder commands for better Docker layer caching
This commit is contained in:
Michal Čihař
2016-11-28 10:23:19 +01:00
committed by GitHub
5 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -27,5 +27,5 @@ script:
- docker run --name arbitraryadmin -d --link db_server:db3 -e PMA_ARBITRARY=1 -p 7070:80 phpmyadmin/phpmyadmin
- ./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 ./config.test.inc.php`:/www/config.user.inc.php -p 7080:80 phpmyadmin/phpmyadmin
- docker run --name userconfigadmin -d --link db_server:db3 -v `readlink -f ./config.test.inc.php`:/etc/phpmyadmin/config.user.inc.php -p 7080:80 phpmyadmin/phpmyadmin
- ./test-docker.sh userconfigadmin 7080 db3
+8 -8
View File
@@ -6,6 +6,13 @@ RUN apk add --no-cache php5-mysqli php5-ctype php5-xml php5-gd php5-zlib php5-bz
# Include keyring to verify download
COPY phpmyadmin.keyring /
# 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.6.5.1
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.gz
@@ -28,18 +35,11 @@ RUN set -x \
&& mkdir /www/doc \
&& mv /www/htmldoc /www/doc/html \
&& rm -rf /www/js/jquery/src/ /www/js/openlayers/src/ /www/setup/ /www/examples/ /www/test/ /www/po/ /www/templates/test/ /www/phpunit.xml.* /www/build.xml /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 {} \;
# Copy configuration
COPY config.inc.php /www/
COPY etc /etc/
# Copy main script
COPY run.sh /run.sh
RUN chmod u+rwx /run.sh
# Add volume for sessions to allow session persistence
VOLUME /sessions
+2 -2
View File
@@ -66,11 +66,11 @@ by creating a file named "config.user.inc.php" with the various user defined set
in it, and then linking it into the container using:
```
-v /some/local/directory/config.user.inc.php:/www/config.user.inc.php
-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:/www/config.user.inc.php phpmyadmin/phpmyadmin
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.
+1 -1
View File
@@ -295,7 +295,7 @@ serialize_precision = 17
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file.
; http://php.net/open-basedir
open_basedir = /www/:/tmp/
open_basedir = /www/:/tmp/:/etc/phpmyadmin/
; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names.
@@ -70,6 +70,6 @@ $cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
/* Include User Defined Settings Hook */
if (file_exists('/www/config.user.inc.php')) {
include('/www/config.user.inc.php');
if (file_exists('/etc/phpmyadmin/config.user.inc.php')) {
include('/etc/phpmyadmin/config.user.inc.php');
}