Compare commits

..
37 Commits
Author SHA1 Message Date
Isaac Bennetch 4f54fc3b46 Release 4.9.6
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2020-10-10 00:15:20 -04:00
William Desportes 785cd48c48 #268 - Add instructions to download bashbrew 2020-09-03 18:23:25 +02:00
William Desportes 301a7c4d18 Merge #268 - Update generate-stackbrew-library.sh 2020-09-03 18:07:59 +02:00
William Desportes ad9f085601 Merge #303 - Fix docker hub tags page link 2020-09-03 18:07:16 +02:00
ff56a56a29 Use the docker library path for tags page
Co-authored-by: William Desportes <williamdes@wdes.fr>
2020-09-03 18:03:41 +02:00
Thomas DutrionandGitHub e3b575ca8e Fix docker hub tags page link
Fix Docker hub tags page link in README
2020-09-03 17:35:54 +02:00
William Desportes b9da1f2c54 Merge #301 - Update paths to image 2020-08-31 19:13:36 +02:00
J0WI d00506237d Update paths to image 2020-08-30 17:22:07 +02:00
William Desportes 39cec98bb5 Use fences for pseudo regex example of #297
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-07-31 23:47:13 +02:00
William Desportes 300ade5226 Merge #297 - Improve UPLOAD_LIMIT documentation 2020-07-31 23:44:12 +02:00
Thomas DecauxandGitHub 76651f53b3 Specify UPLOAD_LIMIT format
Default value format "2048Kb" will not work with Apache !
2020-07-31 15:35:37 +02:00
William Desportes 9d66e78f8a Merge #289 - Add SHA checksum when downloading a version
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-06-01 10:57:51 +02:00
William Desportes 85a642d7b3 Make sha256 fetching more strict
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-06-01 10:56:52 +02:00
J0WI 6e3aeb3adf Update generate-stackbrew-library.sh 2020-05-16 03:07:45 +02:00
William Desportes c0b2ac28f9 Merge #288 - Use same "latest" procedure as in update.sh
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-09 17:46:43 +02:00
J0WI 52d6fe4caf Use same "latest" procedure as in update.sh 2020-05-08 04:46:46 +02:00
J0WI f464cf5a67 Add SHA checksum 2020-05-08 04:44:41 +02:00
William Desportes d1f2dea243 Revert 490df186e5
This commit is no more needed because 27f6f7e5ae fixed the tag process

Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-07 09:48:08 +02:00
William Desportes 27f6f7e5ae Fix parsing each revision on generate-stackbrew-library.sh
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-07 08:50:07 +02:00
William Desportes 490df186e5 Add each variant to the tag list
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-07 08:49:31 +02:00
William Desportes d826f3a721 Merge #286 - cleanup after review for #56
Partial revert of 6b63869f1c

Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-05-07 08:30:07 +02:00
J0WI 12d40a0300 Cleanup according to review 2020-05-07 01:11:27 +02:00
William Desportes 48f16c0dde Update files after #285
Ref: https://github.com/phpmyadmin/docker/pull/285#issuecomment-612213968
2020-04-18 18:05:28 +02:00
Isaac BennetchandGitHub 0dbbe66eb3 Merge pull request #285 from ibennetch/webroot
Extract downloaded files directly to web root /var/www/html/
2020-04-18 11:30:12 -04:00
Isaac Bennetch 4d5c71ca6e Extract downloaded files directly to web root /var/www/html/
Fixes #277

Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2020-04-10 16:34:27 -04:00
Isaac BennetchandGitHub 459489d8c1 Merge pull request #283 from krufab/bugfix/281-added-tzdata-package
#281 Added tzdata also to the template alpine file
2020-03-29 13:57:44 -04:00
Fabio Kruger ac3c819a69 #281 Added tzdata also to the template alpine file
Signed-off-by: Fabio Kruger <krufab@gmail.com>
2020-03-29 19:15:03 +02:00
Isaac BennetchandGitHub 34c0696109 Merge pull request #282 from krufab/bugfix/281-added-tzdata-package
#281 Added tzdata package
2020-03-28 21:26:23 -04:00
Fabio Kruger 3a9dc863e2 #281 Added tzdata package
Signed-off-by: Fabio Kruger <krufab@gmail.com>
2020-03-27 23:16:29 +01:00
Isaac Bennetch 6c9a35dc6e Release 5.0.2
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2020-03-21 00:44:01 -04:00
William Desportes 26be7daa0c Merge #275 - add some org.opencontainers.image.* labels
Pull-request: #275
2020-03-17 21:41:24 +01:00
William Desportes 6b63869f1c Add org.opencontainers.image.* labels
Licence: https://github.com/phpmyadmin/phpmyadmin/blob/master/composer.json
2020-03-17 21:37:29 +01:00
William Desportes a4071cd297 Merge #274 - apply some feedback from docker-library team
Pull-request: #274
2020-03-17 20:15:46 +01:00
J0WI e05baec603 Apply various minor enhancements 2020-03-17 18:16:01 +01:00
William Desportes 6cd68f9647 Fix generate-stackbrew-library.sh Maintainers format
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-16 23:16:05 +01:00
William Desportes 48f555eb3d Maintainer replacement
I put my name here because Michal Čihař resigned from phpMyAdmin
https://blog.cihar.com/archives/2019/05/29/spring-cleanup/
I hope this change is okay :)
[ci skip]
Signed-off-by: William Desportes <williamdes@wdes.fr>
2020-01-16 23:01:11 +01:00
Isaac Bennetch 8c9962be4f Release 5.0.1
Signed-off-by: Isaac Bennetch <bennetch@gmail.com>
2020-01-07 22:07:49 -05:00
17 changed files with 220 additions and 279 deletions
+9 -9
View File
@@ -29,18 +29,18 @@ _helpers:
stage: "Run tests in testing container"
script:
# Build image
- docker build -t phpmyadmin/phpmyadmin apache
- docker build -t phpmyadmin apache
# Test for single database
- docker run --name testadmin -d --link db_server:db -p 9090:80 phpmyadmin/phpmyadmin
- docker run --name testadmin -d --link db_server:db -p 9090:80 phpmyadmin
- ./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 run --name envadmin -d --link db_server:db2 -e PMA_HOST=db2 -p 6060:80 phpmyadmin
- ./testing/test-docker.sh envadmin 6060
# Test for arbitrary database
- docker run --name arbitraryadmin -d --link db_server:db3 -e PMA_ARBITRARY=1 -p 7070:80 phpmyadmin/phpmyadmin
- docker run --name arbitraryadmin -d --link db_server:db3 -e PMA_ARBITRARY=1 -p 7070:80 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
- 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
- ./testing/test-docker.sh userconfigadmin 7080 db3
- &test-docker-compose-db
stage: "Test docker-compose"
@@ -71,20 +71,20 @@ jobs:
name: "Apache amd64"
arch: amd64
script:
- docker build -t phpmyadmin/phpmyadmin apache
- docker build -t phpmyadmin apache
- <<: *build-image
name: "fpm amd64"
arch: amd64
script:
- docker build -t phpmyadmin/phpmyadmin fpm
- docker build -t phpmyadmin fpm
- <<: *build-image
name: "fpm-alpine amd64"
arch: amd64
script:
- docker build -t phpmyadmin/phpmyadmin fpm-alpine
- docker build -t phpmyadmin fpm-alpine
- <<: *test-apache-image
name: "Run testing for MariaDB"
env: DB=mariadb:latest
- <<: *test-apache-image
name: "Run testing for MySQL"
env: DB=mysql:latest
env: DB=mysql:latest
+26 -14
View File
@@ -2,7 +2,8 @@ FROM php:7.4-%%VARIANT%%
# docker-entrypoint.sh dependencies
RUN apk add --no-cache \
bash
bash \
tzdata
# Install dependencies
RUN set -ex; \
@@ -33,11 +34,13 @@ RUN set -ex; \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --virtual .phpmyadmin-phpexts-rundeps $runDeps; \
apk del .build-deps
apk del --no-network .build-deps
# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN { \
RUN set -ex; \
\
{ \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
@@ -58,8 +61,18 @@ RUN { \
# Calculate download URL
ENV VERSION %%VERSION%%
ENV SHA256 %%SHA256%%
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.xz
LABEL version=$VERSION
LABEL org.opencontainers.image.title="Official phpMyAdmin Docker image" \
org.opencontainers.image.description="Run phpMyAdmin with Alpine, Apache and PHP FPM." \
org.opencontainers.image.authors="The phpMyAdmin Team <developers@phpmyadmin.net>" \
org.opencontainers.image.vendor="phpMyAdmin" \
org.opencontainers.image.documentation="https://github.com/phpmyadmin/docker#readme" \
org.opencontainers.image.licenses="GPL-2.0-only" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.url="https://github.com/phpmyadmin/docker#readme" \
org.opencontainers.image.source="https://github.com/phpmyadmin/docker.git"
# Download tarball, verify it using gpg and extract
RUN set -ex; \
@@ -69,24 +82,23 @@ RUN set -ex; \
\
export GNUPGHOME="$(mktemp -d)"; \
export GPGKEY="3D06A59ECE730EB71B511C17CE752F178259BD92"; \
curl --output phpMyAdmin.tar.xz --location $URL; \
curl --output phpMyAdmin.tar.xz.asc --location $URL.asc; \
curl -fsSL -o phpMyAdmin.tar.xz $URL; \
curl -fsSL -o phpMyAdmin.tar.xz.asc $URL.asc; \
echo "$SHA256 *phpMyAdmin.tar.xz" | sha256sum -c -; \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver ipv4.pool.sks-keyservers.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver keys.gnupg.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver pgp.mit.edu --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver keyserver.pgp.com --recv-keys "$GPGKEY"; \
gpg --batch --verify phpMyAdmin.tar.xz.asc phpMyAdmin.tar.xz; \
tar -xf phpMyAdmin.tar.xz -C /usr/src; \
tar -xf phpMyAdmin.tar.xz -C /var/www/html --strip-components=1; \
mkdir -p /var/www/html/tmp; \
chown www-data:www-data /var/www/html/tmp; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
mv /usr/src/phpMyAdmin-$VERSION-all-languages /usr/src/phpmyadmin; \
rm -rf /usr/src/phpmyadmin/setup/ /usr/src/phpmyadmin/examples/ /usr/src/phpmyadmin/test/ /usr/src/phpmyadmin/po/ /usr/src/phpmyadmin/composer.json /usr/src/phpmyadmin/RELEASE-DATE-$VERSION; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /usr/src/phpmyadmin/libraries/vendor_config.php; \
# Add directory for sessions to allow session persistence
mkdir /sessions; \
mkdir -p /var/nginx/client_body_temp; \
apk del .fetch-deps
rm -rf /var/www/html/setup/ /var/www/html/examples/ /var/www/html/test/ /var/www/html/po/ /var/www/html/composer.json /var/www/html/RELEASE-DATE-$VERSION; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
apk del --no-network .fetch-deps
# Copy configuration
COPY config.inc.php /etc/phpmyadmin/config.inc.php
+31 -16
View File
@@ -40,7 +40,9 @@ RUN set -ex; \
# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN { \
RUN set -ex; \
\
{ \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
@@ -61,39 +63,52 @@ RUN { \
# Calculate download URL
ENV VERSION %%VERSION%%
ENV SHA256 %%SHA256%%
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.xz
LABEL version=$VERSION
LABEL org.opencontainers.image.title="Official phpMyAdmin Docker image" \
org.opencontainers.image.description="Run phpMyAdmin with Alpine, Apache and PHP FPM." \
org.opencontainers.image.authors="The phpMyAdmin Team <developers@phpmyadmin.net>" \
org.opencontainers.image.vendor="phpMyAdmin" \
org.opencontainers.image.documentation="https://github.com/phpmyadmin/docker#readme" \
org.opencontainers.image.licenses="GPL-2.0-only" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.url="https://github.com/phpmyadmin/docker#readme" \
org.opencontainers.image.source="https://github.com/phpmyadmin/docker.git"
# Download tarball, verify it using gpg and extract
RUN set -ex; \
fetchDeps=" \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
gnupg \
dirmngr \
"; \
apt-get update; \
apt-get install -y --no-install-recommends $fetchDeps; \
; \
\
export GNUPGHOME="$(mktemp -d)"; \
export GPGKEY="3D06A59ECE730EB71B511C17CE752F178259BD92"; \
curl --output phpMyAdmin.tar.xz --location $URL; \
curl --output phpMyAdmin.tar.xz.asc --location $URL.asc; \
curl -fsSL -o phpMyAdmin.tar.xz $URL; \
curl -fsSL -o phpMyAdmin.tar.xz.asc $URL.asc; \
echo "$SHA256 *phpMyAdmin.tar.xz" | sha256sum -c -; \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver ipv4.pool.sks-keyservers.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver keys.gnupg.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver pgp.mit.edu --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver keyserver.pgp.com --recv-keys "$GPGKEY"; \
gpg --batch --verify phpMyAdmin.tar.xz.asc phpMyAdmin.tar.xz; \
tar -xf phpMyAdmin.tar.xz -C /usr/src; \
tar -xf phpMyAdmin.tar.xz -C /var/www/html --strip-components=1; \
mkdir -p /var/www/html/tmp; \
chown www-data:www-data /var/www/html/tmp; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
mv /usr/src/phpMyAdmin-$VERSION-all-languages /usr/src/phpmyadmin; \
rm -rf /usr/src/phpmyadmin/setup/ /usr/src/phpmyadmin/examples/ /usr/src/phpmyadmin/test/ /usr/src/phpmyadmin/po/ /usr/src/phpmyadmin/composer.json /usr/src/phpmyadmin/RELEASE-DATE-$VERSION; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /usr/src/phpmyadmin/libraries/vendor_config.php; \
# Add directory for sessions to allow session persistence
mkdir /sessions; \
mkdir -p /var/nginx/client_body_temp; \
rm -rf /var/www/html/setup/ /var/www/html/examples/ /var/www/html/test/ /var/www/html/po/ /var/www/html/composer.json /var/www/html/RELEASE-DATE-$VERSION; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# Copy configuration
+1 -1
View File
@@ -1,4 +1,4 @@
DOCKER_REPO = phpmyadmin/phpmyadmin
DOCKER_REPO = phpmyadmin
.PHONY: all build run logs clean stop rm prune
+23 -16
View File
@@ -2,11 +2,20 @@
Run phpMyAdmin with Alpine, Apache 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")
[![Build Status Travis](https://travis-ci.org/phpmyadmin/docker.svg?branch=master)](https://travis-ci.org/phpmyadmin/docker)
[![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/phpmyadmin.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/phpmyadmin)
[![arm32v5 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/phpmyadmin.svg?label=arm32v5)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/phpmyadmin)
[![arm32v6 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v6/job/phpmyadmin.svg?label=arm32v6)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v6/job/phpmyadmin)
[![arm32v7 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/phpmyadmin.svg?label=arm32v7)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/phpmyadmin)
[![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/phpmyadmin.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/phpmyadmin)
[![i386 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/i386/job/phpmyadmin.svg?label=i386)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/phpmyadmin)
[![mips64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/mips64le/job/phpmyadmin.svg?label=mips64le)](https://doi-janky.infosiftr.net/job/multiarch/job/mips64le/job/phpmyadmin)
[![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/phpmyadmin.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/phpmyadmin)
[![s390x build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/s390x/job/phpmyadmin.svg?label=s390x)](https://doi-janky.infosiftr.net/job/multiarch/job/s390x/job/phpmyadmin)
[![Docker Pulls](https://img.shields.io/docker/pulls/_/phpmyadmin.svg)][hub]
[![Docker Stars](https://img.shields.io/docker/stars/_/phpmyadmin.svg)][hub]
[![Docker Layers](https://images.microbadger.com/badges/image/phpmyadmin.svg)](https://microbadger.com/images/phpmyadmin "Get your own image badge on microbadger.com")
[![Docker Version](https://images.microbadger.com/badges/version/phpmyadmin.svg)](https://microbadger.com/images/phpmyadmin "Get your own version badge on microbadger.com")
All following examples will bring you phpMyAdmin on `http://localhost:8080`
@@ -29,11 +38,9 @@ The following tags are available:
* `latest`, `fpm`, and `fpm-alpine` are always the most recent released version
* Major versions, such as `5`, `5-fpm`, and `5-fpm-alpine`
* Specific minor versions, such as `5.0`, `5.0-fpm`, and `5-fpm-alpine`
* Specific patch versions, such as `5.0.0`, `5.0.0-fpm`, and `5.0.0-alpine`. Note that, on rare occasion,
there may be an intermediary "docker-only" release, such as 4.9.2-1
* `edge`, `edge-fpm`, `edge-fpm-alpine`, a development version build from the daily snapshot
* Specific patch versions, such as `5.0.0`, `5.0.0-fpm`, and `5.0.0-alpine`
A complete list of tags is [available at Docker Hub](https://hub.docker.com/r/phpmyadmin/phpmyadmin/tags)
A complete list of tags is [available at Docker Hub](https://hub.docker.com/_/phpmyadmin?tab=tags)
## Image variants
@@ -52,7 +59,7 @@ First you need to run MySQL or MariaDB server in Docker, and this image need
link a running mysql instance container:
```
docker run --name myadmin -d --link mysql_db_server:db -p 8080:80 phpmyadmin/phpmyadmin
docker run --name myadmin -d --link mysql_db_server:db -p 8080:80 phpmyadmin
```
## Usage with external server
@@ -61,7 +68,7 @@ You can specify MySQL host in the `PMA_HOST` environment variable. You can also
use `PMA_PORT` to specify port of the server in case it's not the default one:
```
docker run --name myadmin -d -e PMA_HOST=dbhost -p 8080:80 phpmyadmin/phpmyadmin
docker run --name myadmin -d -e PMA_HOST=dbhost -p 8080:80 phpmyadmin
```
## Usage with arbitrary server
@@ -69,7 +76,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 -e PMA_ARBITRARY=1 -p 8080:80 phpmyadmin/phpmyadmin
docker run --name myadmin -d -e PMA_ARBITRARY=1 -p 8080:80 phpmyadmin
```
## Usage with docker-compose and arbitrary server
@@ -104,7 +111,7 @@ in it, and then linking it into the container using:
```
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
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
```
See the following links for config file information.
@@ -127,13 +134,13 @@ Set the variable ``PMA_ABSOLUTE_URI`` to the fully-qualified path (``https://pma
* ``PMA_USER`` and ``PMA_PASSWORD`` - define username to use for config authentication method
* ``PMA_ABSOLUTE_URI`` - define user-facing URI
* ``HIDE_PHP_VERSION`` - if defined, will hide the php version (`expose_php = Off`). Set to any value (such as HIDE_PHP_VERSION=true).
* ``UPLOAD_LIMIT`` - if set, will override the default value for apache and php-fpm (default value is 2048 kb)
* ``UPLOAD_LIMIT`` - if set, will override the default value for apache and php-fpm (format as `[0-9+](K,M,G)` default value is 2048K, this will change ``upload_max_filesize`` and ``post_max_size`` values)
* ``PMA_CONFIG_BASE64`` - if set, will override the default config.inc.php with the base64 decoded contents of the variable
* ``PMA_USER_CONFIG_BASE64`` - if set, will override the default config.user.inc.php with the base64 decoded contents of the variable
For usage with Docker secrets, appending ``_FILE`` to the ``PMA_PASSWORD`` environment variable is allowed (it overrides ``PMA_PASSWORD`` if it is set):
```
docker run --name myadmin -d -e PMA_PASSWORD_FILE=/run/secrets/db_password.txt -p 8080:80 phpmyadmin/phpmyadmin
docker run --name myadmin -d -e PMA_PASSWORD_FILE=/run/secrets/db_password.txt -p 8080:80 phpmyadmin
```
#### Variables that can be read from a file using ``_FILE``
@@ -145,7 +152,7 @@ docker run --name myadmin -d -e PMA_PASSWORD_FILE=/run/secrets/db_password.txt -
For more detailed documentation see https://docs.phpmyadmin.net/en/latest/setup.html#installing-using-docker
[hub]: https://hub.docker.com/r/phpmyadmin/phpmyadmin/
[hub]: https://hub.docker.com/_/phpmyadmin
Please report any issues with the Docker container to https://github.com/phpmyadmin/docker/issues
+32 -17
View File
@@ -40,7 +40,9 @@ RUN set -ex; \
# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN { \
RUN set -ex; \
\
{ \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
@@ -60,40 +62,53 @@ RUN { \
} > $PHP_INI_DIR/conf.d/phpmyadmin-misc.ini
# Calculate download URL
ENV VERSION 4.9.4
ENV VERSION 4.9.6
ENV SHA256 daa79d371d1cdf9a1dcc7f45ba4e3086f6d0fbaefde71f9f4ccb66d9686186a9
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.xz
LABEL version=$VERSION
LABEL org.opencontainers.image.title="Official phpMyAdmin Docker image" \
org.opencontainers.image.description="Run phpMyAdmin with Alpine, Apache and PHP FPM." \
org.opencontainers.image.authors="The phpMyAdmin Team <developers@phpmyadmin.net>" \
org.opencontainers.image.vendor="phpMyAdmin" \
org.opencontainers.image.documentation="https://github.com/phpmyadmin/docker#readme" \
org.opencontainers.image.licenses="GPL-2.0-only" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.url="https://github.com/phpmyadmin/docker#readme" \
org.opencontainers.image.source="https://github.com/phpmyadmin/docker.git"
# Download tarball, verify it using gpg and extract
RUN set -ex; \
fetchDeps=" \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
gnupg \
dirmngr \
"; \
apt-get update; \
apt-get install -y --no-install-recommends $fetchDeps; \
; \
\
export GNUPGHOME="$(mktemp -d)"; \
export GPGKEY="3D06A59ECE730EB71B511C17CE752F178259BD92"; \
curl --output phpMyAdmin.tar.xz --location $URL; \
curl --output phpMyAdmin.tar.xz.asc --location $URL.asc; \
curl -fsSL -o phpMyAdmin.tar.xz $URL; \
curl -fsSL -o phpMyAdmin.tar.xz.asc $URL.asc; \
echo "$SHA256 *phpMyAdmin.tar.xz" | sha256sum -c -; \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver ipv4.pool.sks-keyservers.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver keys.gnupg.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver pgp.mit.edu --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver keyserver.pgp.com --recv-keys "$GPGKEY"; \
gpg --batch --verify phpMyAdmin.tar.xz.asc phpMyAdmin.tar.xz; \
tar -xf phpMyAdmin.tar.xz -C /usr/src; \
tar -xf phpMyAdmin.tar.xz -C /var/www/html --strip-components=1; \
mkdir -p /var/www/html/tmp; \
chown www-data:www-data /var/www/html/tmp; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
mv /usr/src/phpMyAdmin-$VERSION-all-languages /usr/src/phpmyadmin; \
rm -rf /usr/src/phpmyadmin/setup/ /usr/src/phpmyadmin/examples/ /usr/src/phpmyadmin/test/ /usr/src/phpmyadmin/po/ /usr/src/phpmyadmin/composer.json /usr/src/phpmyadmin/RELEASE-DATE-$VERSION; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /usr/src/phpmyadmin/libraries/vendor_config.php; \
# Add directory for sessions to allow session persistence
mkdir /sessions; \
mkdir -p /var/nginx/client_body_temp; \
rm -rf /var/www/html/setup/ /var/www/html/examples/ /var/www/html/test/ /var/www/html/po/ /var/www/html/composer.json /var/www/html/RELEASE-DATE-$VERSION; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# Copy configuration
+1 -36
View File
@@ -1,40 +1,5 @@
#!/bin/bash
if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
if [ "$(id -u)" = '0' ]; then
case "$1" in
apache2*)
user="${APACHE_RUN_USER:-www-data}"
group="${APACHE_RUN_GROUP:-www-data}"
;;
*) # php-fpm
user='www-data'
group='www-data'
;;
esac
else
user="$(id -u)"
group="$(id -g)"
fi
# Custom folders for sessions
chown ${user}:${group} /sessions /var/nginx/client_body_temp
if ! [ -e index.php -a -e url.php ]; then
echo >&2 "phpMyAdmin not found in $PWD - copying now..."
if [ "$(ls -A)" ]; then
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
( set -x; ls -A; sleep 10 )
fi
tar --create \
--file - \
--one-file-system \
--directory /usr/src/phpmyadmin \
--owner "$user" --group "$group" \
. | tar --extract --file -
echo >&2 "Complete! phpMyAdmin has been successfully copied to $PWD"
mkdir -p tmp; \
chmod -R 777 tmp; \
fi
if [ ! -f /etc/phpmyadmin/config.secret.inc.php ]; then
cat > /etc/phpmyadmin/config.secret.inc.php <<EOT
@@ -69,7 +34,7 @@ if [ ! -z "${PMA_USER_CONFIG_BASE64}" ]; then
echo "${PMA_USER_CONFIG_BASE64}" | base64 -d > /etc/phpmyadmin/config.user.inc.php
fi
function get_docker_secret() {
get_docker_secret() {
local env_var="${1}"
local env_var_file="${env_var}_FILE"
+1 -1
View File
@@ -1,5 +1,5 @@
phpmyadmin:
image: phpmyadmin/phpmyadmin
image: phpmyadmin
container_name: phpmyadmin
environment:
- PMA_ARBITRARY=1
+1 -36
View File
@@ -1,40 +1,5 @@
#!/bin/bash
if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
if [ "$(id -u)" = '0' ]; then
case "$1" in
apache2*)
user="${APACHE_RUN_USER:-www-data}"
group="${APACHE_RUN_GROUP:-www-data}"
;;
*) # php-fpm
user='www-data'
group='www-data'
;;
esac
else
user="$(id -u)"
group="$(id -g)"
fi
# Custom folders for sessions
chown ${user}:${group} /sessions /var/nginx/client_body_temp
if ! [ -e index.php -a -e url.php ]; then
echo >&2 "phpMyAdmin not found in $PWD - copying now..."
if [ "$(ls -A)" ]; then
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
( set -x; ls -A; sleep 10 )
fi
tar --create \
--file - \
--one-file-system \
--directory /usr/src/phpmyadmin \
--owner "$user" --group "$group" \
. | tar --extract --file -
echo >&2 "Complete! phpMyAdmin has been successfully copied to $PWD"
mkdir -p tmp; \
chmod -R 777 tmp; \
fi
if [ ! -f /etc/phpmyadmin/config.secret.inc.php ]; then
cat > /etc/phpmyadmin/config.secret.inc.php <<EOT
@@ -69,7 +34,7 @@ if [ ! -z "${PMA_USER_CONFIG_BASE64}" ]; then
echo "${PMA_USER_CONFIG_BASE64}" | base64 -d > /etc/phpmyadmin/config.user.inc.php
fi
function get_docker_secret() {
get_docker_secret() {
local env_var="${1}"
local env_var_file="${env_var}_FILE"
+27 -15
View File
@@ -2,7 +2,8 @@ FROM php:7.4-fpm-alpine
# docker-entrypoint.sh dependencies
RUN apk add --no-cache \
bash
bash \
tzdata
# Install dependencies
RUN set -ex; \
@@ -33,11 +34,13 @@ RUN set -ex; \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --virtual .phpmyadmin-phpexts-rundeps $runDeps; \
apk del .build-deps
apk del --no-network .build-deps
# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN { \
RUN set -ex; \
\
{ \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
@@ -57,9 +60,19 @@ RUN { \
} > $PHP_INI_DIR/conf.d/phpmyadmin-misc.ini
# Calculate download URL
ENV VERSION 4.9.4
ENV VERSION 4.9.6
ENV SHA256 daa79d371d1cdf9a1dcc7f45ba4e3086f6d0fbaefde71f9f4ccb66d9686186a9
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.xz
LABEL version=$VERSION
LABEL org.opencontainers.image.title="Official phpMyAdmin Docker image" \
org.opencontainers.image.description="Run phpMyAdmin with Alpine, Apache and PHP FPM." \
org.opencontainers.image.authors="The phpMyAdmin Team <developers@phpmyadmin.net>" \
org.opencontainers.image.vendor="phpMyAdmin" \
org.opencontainers.image.documentation="https://github.com/phpmyadmin/docker#readme" \
org.opencontainers.image.licenses="GPL-2.0-only" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.url="https://github.com/phpmyadmin/docker#readme" \
org.opencontainers.image.source="https://github.com/phpmyadmin/docker.git"
# Download tarball, verify it using gpg and extract
RUN set -ex; \
@@ -69,24 +82,23 @@ RUN set -ex; \
\
export GNUPGHOME="$(mktemp -d)"; \
export GPGKEY="3D06A59ECE730EB71B511C17CE752F178259BD92"; \
curl --output phpMyAdmin.tar.xz --location $URL; \
curl --output phpMyAdmin.tar.xz.asc --location $URL.asc; \
curl -fsSL -o phpMyAdmin.tar.xz $URL; \
curl -fsSL -o phpMyAdmin.tar.xz.asc $URL.asc; \
echo "$SHA256 *phpMyAdmin.tar.xz" | sha256sum -c -; \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver ipv4.pool.sks-keyservers.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver keys.gnupg.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver pgp.mit.edu --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver keyserver.pgp.com --recv-keys "$GPGKEY"; \
gpg --batch --verify phpMyAdmin.tar.xz.asc phpMyAdmin.tar.xz; \
tar -xf phpMyAdmin.tar.xz -C /usr/src; \
tar -xf phpMyAdmin.tar.xz -C /var/www/html --strip-components=1; \
mkdir -p /var/www/html/tmp; \
chown www-data:www-data /var/www/html/tmp; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
mv /usr/src/phpMyAdmin-$VERSION-all-languages /usr/src/phpmyadmin; \
rm -rf /usr/src/phpmyadmin/setup/ /usr/src/phpmyadmin/examples/ /usr/src/phpmyadmin/test/ /usr/src/phpmyadmin/po/ /usr/src/phpmyadmin/composer.json /usr/src/phpmyadmin/RELEASE-DATE-$VERSION; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /usr/src/phpmyadmin/libraries/vendor_config.php; \
# Add directory for sessions to allow session persistence
mkdir /sessions; \
mkdir -p /var/nginx/client_body_temp; \
apk del .fetch-deps
rm -rf /var/www/html/setup/ /var/www/html/examples/ /var/www/html/test/ /var/www/html/po/ /var/www/html/composer.json /var/www/html/RELEASE-DATE-$VERSION; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
apk del --no-network .fetch-deps
# Copy configuration
COPY config.inc.php /etc/phpmyadmin/config.inc.php
+1 -36
View File
@@ -1,40 +1,5 @@
#!/bin/bash
if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
if [ "$(id -u)" = '0' ]; then
case "$1" in
apache2*)
user="${APACHE_RUN_USER:-www-data}"
group="${APACHE_RUN_GROUP:-www-data}"
;;
*) # php-fpm
user='www-data'
group='www-data'
;;
esac
else
user="$(id -u)"
group="$(id -g)"
fi
# Custom folders for sessions
chown ${user}:${group} /sessions /var/nginx/client_body_temp
if ! [ -e index.php -a -e url.php ]; then
echo >&2 "phpMyAdmin not found in $PWD - copying now..."
if [ "$(ls -A)" ]; then
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
( set -x; ls -A; sleep 10 )
fi
tar --create \
--file - \
--one-file-system \
--directory /usr/src/phpmyadmin \
--owner "$user" --group "$group" \
. | tar --extract --file -
echo >&2 "Complete! phpMyAdmin has been successfully copied to $PWD"
mkdir -p tmp; \
chmod -R 777 tmp; \
fi
if [ ! -f /etc/phpmyadmin/config.secret.inc.php ]; then
cat > /etc/phpmyadmin/config.secret.inc.php <<EOT
@@ -69,7 +34,7 @@ if [ ! -z "${PMA_USER_CONFIG_BASE64}" ]; then
echo "${PMA_USER_CONFIG_BASE64}" | base64 -d > /etc/phpmyadmin/config.user.inc.php
fi
function get_docker_secret() {
get_docker_secret() {
local env_var="${1}"
local env_var_file="${env_var}_FILE"
+32 -17
View File
@@ -40,7 +40,9 @@ RUN set -ex; \
# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php
RUN { \
RUN set -ex; \
\
{ \
echo 'opcache.memory_consumption=128'; \
echo 'opcache.interned_strings_buffer=8'; \
echo 'opcache.max_accelerated_files=4000'; \
@@ -60,40 +62,53 @@ RUN { \
} > $PHP_INI_DIR/conf.d/phpmyadmin-misc.ini
# Calculate download URL
ENV VERSION 4.9.4
ENV VERSION 4.9.6
ENV SHA256 daa79d371d1cdf9a1dcc7f45ba4e3086f6d0fbaefde71f9f4ccb66d9686186a9
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.xz
LABEL version=$VERSION
LABEL org.opencontainers.image.title="Official phpMyAdmin Docker image" \
org.opencontainers.image.description="Run phpMyAdmin with Alpine, Apache and PHP FPM." \
org.opencontainers.image.authors="The phpMyAdmin Team <developers@phpmyadmin.net>" \
org.opencontainers.image.vendor="phpMyAdmin" \
org.opencontainers.image.documentation="https://github.com/phpmyadmin/docker#readme" \
org.opencontainers.image.licenses="GPL-2.0-only" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.url="https://github.com/phpmyadmin/docker#readme" \
org.opencontainers.image.source="https://github.com/phpmyadmin/docker.git"
# Download tarball, verify it using gpg and extract
RUN set -ex; \
fetchDeps=" \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
gnupg \
dirmngr \
"; \
apt-get update; \
apt-get install -y --no-install-recommends $fetchDeps; \
; \
\
export GNUPGHOME="$(mktemp -d)"; \
export GPGKEY="3D06A59ECE730EB71B511C17CE752F178259BD92"; \
curl --output phpMyAdmin.tar.xz --location $URL; \
curl --output phpMyAdmin.tar.xz.asc --location $URL.asc; \
curl -fsSL -o phpMyAdmin.tar.xz $URL; \
curl -fsSL -o phpMyAdmin.tar.xz.asc $URL.asc; \
echo "$SHA256 *phpMyAdmin.tar.xz" | sha256sum -c -; \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver ipv4.pool.sks-keyservers.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver keys.gnupg.net --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver pgp.mit.edu --recv-keys "$GPGKEY" \
|| gpg --batch --keyserver keyserver.pgp.com --recv-keys "$GPGKEY"; \
gpg --batch --verify phpMyAdmin.tar.xz.asc phpMyAdmin.tar.xz; \
tar -xf phpMyAdmin.tar.xz -C /usr/src; \
tar -xf phpMyAdmin.tar.xz -C /var/www/html --strip-components=1; \
mkdir -p /var/www/html/tmp; \
chown www-data:www-data /var/www/html/tmp; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
mv /usr/src/phpMyAdmin-$VERSION-all-languages /usr/src/phpmyadmin; \
rm -rf /usr/src/phpmyadmin/setup/ /usr/src/phpmyadmin/examples/ /usr/src/phpmyadmin/test/ /usr/src/phpmyadmin/po/ /usr/src/phpmyadmin/composer.json /usr/src/phpmyadmin/RELEASE-DATE-$VERSION; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /usr/src/phpmyadmin/libraries/vendor_config.php; \
# Add directory for sessions to allow session persistence
mkdir /sessions; \
mkdir -p /var/nginx/client_body_temp; \
rm -rf /var/www/html/setup/ /var/www/html/examples/ /var/www/html/test/ /var/www/html/po/ /var/www/html/composer.json /var/www/html/RELEASE-DATE-$VERSION; \
sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /var/www/html/libraries/vendor_config.php; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# Copy configuration
+1 -36
View File
@@ -1,40 +1,5 @@
#!/bin/bash
if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
if [ "$(id -u)" = '0' ]; then
case "$1" in
apache2*)
user="${APACHE_RUN_USER:-www-data}"
group="${APACHE_RUN_GROUP:-www-data}"
;;
*) # php-fpm
user='www-data'
group='www-data'
;;
esac
else
user="$(id -u)"
group="$(id -g)"
fi
# Custom folders for sessions
chown ${user}:${group} /sessions /var/nginx/client_body_temp
if ! [ -e index.php -a -e url.php ]; then
echo >&2 "phpMyAdmin not found in $PWD - copying now..."
if [ "$(ls -A)" ]; then
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
( set -x; ls -A; sleep 10 )
fi
tar --create \
--file - \
--one-file-system \
--directory /usr/src/phpmyadmin \
--owner "$user" --group "$group" \
. | tar --extract --file -
echo >&2 "Complete! phpMyAdmin has been successfully copied to $PWD"
mkdir -p tmp; \
chmod -R 777 tmp; \
fi
if [ ! -f /etc/phpmyadmin/config.secret.inc.php ]; then
cat > /etc/phpmyadmin/config.secret.inc.php <<EOT
@@ -69,7 +34,7 @@ if [ ! -z "${PMA_USER_CONFIG_BASE64}" ]; then
echo "${PMA_USER_CONFIG_BASE64}" | base64 -d > /etc/phpmyadmin/config.user.inc.php
fi
function get_docker_secret() {
get_docker_secret() {
local env_var="${1}"
local env_var_file="${env_var}_FILE"
+27 -28
View File
@@ -25,28 +25,35 @@ dockerfileCommit() {
)
}
# depends on docker library
#getArches() {
# local repo="$1"; shift
# local officialImagesUrl='https://github.com/docker-library/official-images/raw/master/library/'
#
# eval "declare -g -A parentRepoToArches=( $(
# find -name 'Dockerfile' -exec awk '
# toupper($1) == "FROM" && $2 !~ /^('"$repo"'|scratch|microsoft\/[^:]+)(:|$)/ {
# print "'"$officialImagesUrl"'" $2
# }
# ' '{}' + \
# | sort -u \
# | xargs bashbrew cat --format '[{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"'
# ) )"
#}
#getArches 'phpmyadmin'
getArches() {
local repo="$1"; shift
local officialImagesUrl='https://github.com/docker-library/official-images/raw/master/library/'
eval "declare -g -A parentRepoToArches=( $(
find -name 'Dockerfile' -exec awk '
toupper($1) == "FROM" && $2 !~ /^('"$repo"'|scratch|microsoft\/[^:]+)(:|$)/ {
print "'"$officialImagesUrl"'" $2
}
' '{}' + \
| sort -u \
| xargs bashbrew cat --format '[{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"'
) )"
}
if ! command -v bashbrew --version &> /dev/null
then
echo "bashbrew could not be found"
echo "You can download it from Jenkins at https://github.com/docker-library/bashbrew#installing"
exit 1
fi
getArches 'phpmyadmin'
# Header.
cat <<-EOH
# This file is generated via https://github.com/phpmyadmin/docker/blob/$(fileCommit "$self")/$self
Maintainers: Isaac Bennetch <bennetch@gmail.com>
Michal Čihař <michal@cihar.com>
Maintainers: Isaac Bennetch <bennetch@gmail.com> (@ibennetch),
William Desportes <williamdes@wdes.fr> (@williamdes)
GitRepo: https://github.com/phpmyadmin/docker.git
EOH
@@ -57,13 +64,7 @@ join() {
echo "${out#$sep}"
}
latest="$(
git ls-remote --tags https://github.com/phpmyadmin/phpmyadmin.git \
| cut -d/ -f3 \
| grep -vE -- '-rc|-b' \
| sort -V \
| tail -1
)"
latest="$(curl -fsSL 'https://www.phpmyadmin.net/home_page/version.json' | jq -r '.version')"
for variant in apache fpm fpm-alpine; do
commit="$(dockerfileCommit "$variant")"
@@ -83,9 +84,7 @@ for variant in apache fpm fpm-alpine; do
variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$variant/Dockerfile")"
# depends on docker library
#variantArches="${parentRepoToArches[$variantParent]}"
variantArches="amd64 arm32v7 arm64v8 i386 ppc64le"
variantArches="${parentRepoToArches[$variantParent]}"
cat <<-EOE
Executable
+4
View File
@@ -0,0 +1,4 @@
#!/bin/sh
# This file is used by docker hub to build the image
docker build -t $IMAGE_NAME .
+1 -1
View File
@@ -1,6 +1,6 @@
# Testing image for phpMyAdmin
FROM phpmyadmin/phpmyadmin
FROM phpmyadmin
# Install test dependencies
RUN set -ex; \
+2
View File
@@ -22,6 +22,7 @@ declare -A base=(
)
latest="$(curl -fsSL 'https://www.phpmyadmin.net/home_page/version.json' | jq -r '.version')"
sha256="$(curl -fsSL "https://files.phpmyadmin.net/phpMyAdmin/$latest/phpMyAdmin-$latest-all-languages.tar.xz.sha256" | cut -f1 -d ' ' | tr -cd 'a-f0-9' | cut -c 1-64)"
for variant in apache fpm fpm-alpine; do
template="Dockerfile-${base[$variant]}.template"
@@ -30,6 +31,7 @@ for variant in apache fpm fpm-alpine; do
cp docker-entrypoint.sh "$variant/docker-entrypoint.sh"
sed -ri -e '
s/%%VERSION%%/'"$latest"'/;
s/%%SHA256%%/'"$sha256"'/;
s/%%VARIANT%%/'"$variant"'/;
s/%%CMD%%/'"${cmd[$variant]}"'/;
' "$variant/Dockerfile"