Skip to content

Commit 3c633a9

Browse files
committed
Fix openssl upgrade and improve clean-up
1 parent bddf15b commit 3c633a9

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

php74/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ ENV PHPRUN_DEPS \
2424
ENV PHP_CLI_SERVER_WORKERS 4
2525

2626
RUN set -e \
27-
&& apk add --upgrade --no-cache \
27+
&& apk --update upgrade \
28+
&& apk add --upgrade --virtual .drupal-build \
2829
php7 \
2930
php7-pecl-apcu \
3031
php7-pecl-igbinary \
@@ -67,7 +68,7 @@ RUN set -e \
6768
&& echo 'xdebug.profiler_output_name=cachegrind.out.%p.%r' >> /etc/php7/conf.d/50_xdebug.ini \
6869
# clean-up
6970
# && apk del --no-network .php-build \
70-
# && rm -fr /tmp/pear /usr/include /usr/share/pear /var/cache/apk/* \
71+
# && rm -fr /tmp/pear /usr/include /usr/share/pear \
7172
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
7273
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === getenv('COMPOSER_HASH')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
7374
&& php composer-setup.php \
@@ -81,7 +82,8 @@ RUN set -e \
8182
&& ln -s composer2 /usr/bin/composer \
8283
&& php -r "unlink('composer-setup.php');" \
8384
&& php -r "copy('https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar', '/usr/bin/drush');" \
84-
&& chmod +x /usr/bin/drush && /usr/bin/drush version && rm -fr /root/.drush
85+
&& chmod +x /usr/bin/drush && /usr/bin/drush version && rm -fr /root/.drush \
86+
&& rm -fr /var/cache/apk/*
8587

8688
COPY php.ini /etc/php7/conf.d/xx-drupal.ini
8789

php8/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ ENV PHPRUN_DEPS \
2424
ENV PHP_CLI_SERVER_WORKERS 4
2525

2626
RUN set -e \
27+
&& apk --update upgrade \
2728
&& echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories \
28-
&& apk add --upgrade --no-cache \
29+
&& apk add --upgrade --virtual .drupal-build \
2930
php8 \
3031
php8-pecl-apcu \
3132
php8-pecl-igbinary \
@@ -77,7 +78,7 @@ RUN set -e \
7778
# && strip /usr/lib/php8/modules/xdebug.so \
7879
# clean-up
7980
# && apk del --no-network .php-build \
80-
# && rm -fr /tmp/pear /usr/include /usr/share/pear /var/cache/apk/* \
81+
# && rm -fr /tmp/pear /usr/include /usr/share/pear \
8182
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
8283
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === getenv('COMPOSER_HASH')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
8384
&& php composer-setup.php \
@@ -91,7 +92,8 @@ RUN set -e \
9192
&& ln -s composer2 /usr/bin/composer \
9293
&& php -r "unlink('composer-setup.php');" \
9394
&& php -r "copy('https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar', '/usr/bin/drush');" \
94-
&& chmod +x /usr/bin/drush && /usr/bin/drush version && rm -fr /root/.drush
95+
&& chmod +x /usr/bin/drush && /usr/bin/drush version && rm -fr /root/.drush \
96+
&& rm -fr /var/cache/apk/*
9597

9698
COPY php.ini /etc/php8/conf.d/xx-drupal.ini
9799

php81/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ ENV PHPRUN_DEPS \
2424
ENV PHP_CLI_SERVER_WORKERS 4
2525

2626
RUN set -e \
27+
&& apk --update upgrade \
2728
&& echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories \
28-
&& apk add --upgrade --no-cache \
29+
&& apk add --upgrade --virtual .drupal-build \
2930
php81 \
3031
php81-pecl-apcu \
3132
php81-pecl-igbinary \
@@ -77,7 +78,7 @@ RUN set -e \
7778
# && strip /usr/lib/php8/modules/xdebug.so \
7879
# clean-up
7980
# && apk del --no-network .php-build \
80-
# && rm -fr /tmp/pear /usr/include /usr/share/pear /var/cache/apk/* \
81+
# && rm -fr /tmp/pear /usr/include /usr/share/pear \
8182
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
8283
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === getenv('COMPOSER_HASH')) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
8384
&& php composer-setup.php \
@@ -91,7 +92,8 @@ RUN set -e \
9192
&& ln -s composer2 /usr/bin/composer \
9293
&& php -r "unlink('composer-setup.php');" \
9394
&& php -r "copy('https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar', '/usr/bin/drush');" \
94-
&& chmod +x /usr/bin/drush && /usr/bin/drush version && rm -fr /root/.drush
95+
&& chmod +x /usr/bin/drush && /usr/bin/drush version && rm -fr /root/.drush \
96+
&& rm -fr /var/cache/apk/*
9597

9698
COPY php.ini /etc/php81/conf.d/xx-drupal.ini
9799

0 commit comments

Comments
 (0)