1- FROM alpine:3.7
1+ FROM php:7.2-fpm-alpine
22
33# Install dependencies
4- RUN apk add --no-cache php7-session php7-mysqli php7-mbstring php7-xml php7-gd php7-zlib php7-bz2 php7-zip php7-openssl php7-curl php7-opcache php7-json nginx php7-fpm supervisor
4+ RUN apk add --no-cache --virtual .build-deps \
5+ bzip2-dev \
6+ freetype-dev \
7+ libjpeg-turbo-dev \
8+ libpng-dev \
9+ libwebp-dev \
10+ libxpm-dev \
11+ ; \
12+ \
13+ 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; \
14+ docker-php-ext-install bz2 gd mysqli opcache zip; \
15+ \
16+ runDeps="$( \
17+ scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
18+ | tr ',' '\n ' \
19+ | sort -u \
20+ | awk 'system(" [ -e /usr/local/lib/" $1 " ]") == 0 { next } { print " so:" $1 }' \
21+ )" ; \
22+ apk add --virtual .phpmyadmin-phpexts-rundeps $runDeps; \
23+ apk del .build-deps; \
24+ apk add --no-cache nginx supervisor
525
626# Include keyring to verify download
727COPY phpmyadmin.keyring /
@@ -20,22 +40,22 @@ LABEL version=$VERSION
2040
2141# Download tarball, verify it using gpg and extract
2242RUN set -x \
23- && GNUPGHOME="$(mktemp -d)" \
24- && export GNUPGHOME \
25- && apk add --no-cache curl gnupg \
26- && curl --output phpMyAdmin.tar.gz --location $URL \
27- && curl --output phpMyAdmin.tar.gz.asc --location $URL.asc \
28- && gpgv --keyring /phpmyadmin.keyring phpMyAdmin.tar.gz.asc phpMyAdmin.tar.gz \
29- && apk del --no-cache curl gnupg \
30- && rm -rf "$GNUPGHOME" \
31- && tar xzf phpMyAdmin.tar.gz \
32- && rm -f phpMyAdmin.tar.gz phpMyAdmin.tar.gz.asc \
33- && mv phpMyAdmin-$VERSION-all-languages /www \
34- && rm -rf /www/setup/ /www/examples/ /www/test/ /www/po/ /www/composer.json /www/RELEASE-DATE-$VERSION \
35- && sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /www/libraries/vendor_config.php \
36- && chown -R root:nobody /www \
37- && find /www -type d -exec chmod 750 {} \; \
38- && find /www -type f -exec chmod 640 {} \;
43+ && GNUPGHOME="$(mktemp -d)" \
44+ && export GNUPGHOME \
45+ && apk add --no-cache curl gnupg \
46+ && curl --output phpMyAdmin.tar.gz --location $URL \
47+ && curl --output phpMyAdmin.tar.gz.asc --location $URL.asc \
48+ && gpgv --keyring /phpmyadmin.keyring phpMyAdmin.tar.gz.asc phpMyAdmin.tar.gz \
49+ && apk del --no-cache curl gnupg \
50+ && rm -rf "$GNUPGHOME" \
51+ && tar xzf phpMyAdmin.tar.gz \
52+ && rm -f phpMyAdmin.tar.gz phpMyAdmin.tar.gz.asc \
53+ && mv phpMyAdmin-$VERSION-all-languages /www \
54+ && rm -rf /www/setup/ /www/examples/ /www/test/ /www/po/ /www/composer.json /www/RELEASE-DATE-$VERSION \
55+ && sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /www/libraries/vendor_config.php \
56+ && chown -R root:nobody /www \
57+ && find /www -type d -exec chmod 750 {} \; \
58+ && find /www -type f -exec chmod 640 {} \;
3959
4060# Add directory for sessions to allow session persistence
4161RUN mkdir /sessions
0 commit comments