1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-08 04:04:42 +02:00

upgrade easypi/phpmyadmin-arm

This commit is contained in:
kev 2017-10-02 09:34:37 +08:00
parent dd7dfcb122
commit 970d5ee3e8

View File

@ -5,34 +5,40 @@
FROM easypi/alpine-arm
MAINTAINER EasyPi Software Foundation
WORKDIR /www/
# Install dependencies
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
RUN set -xe \
&& apk add -U curl \
php5-cli \
php5-ctype \
php5-curl \
php5-gd \
php5-json \
php5-mcrypt \
php5-mysqli \
php5-opcache \
php5-openssl \
php5-xml \
php5-zlib \
tar \
&& curl -sSL https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz | tar xz --strip 1 \
&& rm -rf ./examples/ ./js/jquery/src/ ./po/ \
&& curl -sSL https://github.com/phpmyadmin/docker/raw/master/config.inc.php > ./config.inc.php \
&& curl -sSL https://github.com/phpmyadmin/docker/raw/master/run.sh > /run.sh \
&& chmod +x /run.sh \
&& mkdir -p /sessions \
&& apk del curl tar \
&& rm -rf /var/cache/apk/*
# Calculate download URL
ENV VERSION 4.7.4
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.gz
LABEL version=$VERSION
ENV PHP_UPLOAD_MAX_FILESIZE=64M
ENV PHP_MAX_INPUT_VARS=2000
# Download tarball, verify it using gpg and extract
RUN set -x \
&& GNUPGHOME="$(mktemp -d)" \
&& export GNUPGHOME \
&& apk add --no-cache curl gnupg tar \
&& curl -sSL https://github.com/phpmyadmin/docker/archive/${VERSION}-1.tar.gz | \
tar xz --strip 1 -C / docker-${VERSION}-1/etc docker-${VERSION}-1/run.sh docker-${VERSION}-1/phpmyadmin.keyring \
&& 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 tar \
&& 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
CMD ["/run.sh"]
ENTRYPOINT [ "/run.sh" ]
CMD ["phpmyadmin"]