@@ -40,7 +40,9 @@ RUN set -ex; \
4040
4141# set recommended PHP.ini settings
4242# see https://secure.php.net/manual/en/opcache.installation.php
43- RUN { \
43+ RUN set -ex; \
44+ \
45+ { \
4446 echo 'opcache.memory_consumption=128'; \
4547 echo 'opcache.interned_strings_buffer=8'; \
4648 echo 'opcache.max_accelerated_files=4000'; \
@@ -62,38 +64,39 @@ RUN { \
6264# Calculate download URL
6365ENV VERSION %%VERSION%%
6466ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.xz
65- LABEL version=$VERSION
6667
6768# Download tarball, verify it using gpg and extract
6869RUN set -ex; \
69- fetchDeps=" \
70+ \
71+ savedAptMark="$(apt-mark showmanual)"; \
72+ \
73+ apt-get update; \
74+ apt-get install -y --no-install-recommends \
7075 gnupg \
7176 dirmngr \
72- "; \
73- apt-get update; \
74- apt-get install -y --no-install-recommends $fetchDeps; \
77+ ; \
7578 \
7679 export GNUPGHOME="$(mktemp -d)"; \
7780 export GPGKEY="3D06A59ECE730EB71B511C17CE752F178259BD92"; \
78- curl --output phpMyAdmin.tar.xz --location $URL; \
79- curl --output phpMyAdmin.tar.xz.asc --location $URL.asc; \
81+ curl -fsSL -o phpMyAdmin.tar.xz $URL; \
82+ curl -fsSL -o phpMyAdmin.tar.xz.asc $URL.asc; \
8083 gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPGKEY" \
8184 || gpg --batch --keyserver ipv4.pool.sks-keyservers.net --recv-keys "$GPGKEY" \
8285 || gpg --batch --keyserver keys.gnupg.net --recv-keys "$GPGKEY" \
8386 || gpg --batch --keyserver pgp.mit.edu --recv-keys "$GPGKEY" \
8487 || gpg --batch --keyserver keyserver.pgp.com --recv-keys "$GPGKEY"; \
8588 gpg --batch --verify phpMyAdmin.tar.xz.asc phpMyAdmin.tar.xz; \
86- tar -xf phpMyAdmin.tar.xz -C /usr/src; \
89+ mkdir /usr/src/phpmyadmin; \
90+ tar -xf phpMyAdmin.tar.xz -C /usr/src/phpmyadmin --strip-components=1; \
8791 gpgconf --kill all; \
8892 rm -r "$GNUPGHOME" phpMyAdmin.tar.xz phpMyAdmin.tar.xz.asc; \
89- mv /usr/src/phpMyAdmin-$VERSION-all-languages /usr/src/phpmyadmin; \
9093 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; \
9194 sed -i "s@define('CONFIG_DIR'.*@define('CONFIG_DIR', '/etc/phpmyadmin/');@" /usr/src/phpmyadmin/libraries/vendor_config.php; \
9295# Add directory for sessions to allow session persistence
93- mkdir /sessions; \
94- mkdir -p /var/nginx/client_body_temp; \
9596 \
96- apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
97+ apt-mark auto '.*' > /dev/null; \
98+ apt-mark manual $savedAptMark; \
99+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
97100 rm -rf /var/lib/apt/lists/*
98101
99102# Copy configuration
0 commit comments