From 8a547bbf4cf22d4efb8ab203ecfff7314c65a056 Mon Sep 17 00:00:00 2001 From: Uladzimir Tsykun Date: Sat, 2 Dec 2023 13:44:04 +0100 Subject: [PATCH 1/2] Optimize docker image size --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7b82d801..d60241d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,7 @@ RUN set -eux; \ pecl install -o -f redis; \ docker-php-ext-enable redis; \ docker-php-ext-install sockets ldap xsl zip pdo pdo_pgsql pdo_mysql sysvsem opcache \ - bz2 mbstring pcntl; \ + bz2 pcntl; \ runDeps="$( \ scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ | tr ',' '\n' \ From 5d1a255e79b02543bc2b38ebd7d0dce38ee302e7 Mon Sep 17 00:00:00 2001 From: Uladzimir Tsykun Date: Sat, 2 Dec 2023 13:53:55 +0100 Subject: [PATCH 2/2] Optimize docker image size - remove tests from vendor --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d60241d7..699bf2fb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,8 @@ COPY composer.json composer.lock /var/www/packagist/ RUN composer install --no-interaction --no-suggest --no-dev --no-scripts && \ chown www-data:www-data -R /var/www && \ - rm -rf /root/.composer + rm -rf /root/.composer && \ + rm -rf vendor/oro/doctrine-extensions/tests vendor/cebe/markdown/tests vendor/monolog/monolog/logo.jpg COPY --chown=82:82 . /var/www/packagist/