Skip to content

Commit 2953929

Browse files
committed
fix: reduce zip layer size
1 parent ecdcaaf commit 2953929

12 files changed

Lines changed: 56 additions & 29 deletions

File tree

runtime/export.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ cd /opt
1010
LD_LIBRARY_PATH= dnf install -y zip
1111

1212
# Create layer zip
13-
zip --quiet --recurse-paths /ymir/build/${ARCHIVE_FILENAME}.zip .
13+
zip --quiet --recurse-paths --symlinks /ymir/build/${ARCHIVE_FILENAME}.zip .

runtime/php-72/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ RUN curl -Ls https://pecl.php.net/get/imagick | tar xz && cd imagick-*/ && ${INS
8282
RUN curl -sS https://getcomposer.org/installer | ${INSTALL_DIR}/bin/php -- --install-dir=${INSTALL_DIR}/bin/ --filename=composer
8383
RUN git clone https://github.com/ymirapp/php-runtime.git /tmp/runtime-build && cd /tmp/runtime-build && git checkout tags/v1.17.1 && cd /opt \
8484
&& cp -R /tmp/runtime-build/composer.json /tmp/runtime-build/composer.lock /tmp/runtime-build/runtime/bootstrap /tmp/runtime-build/runtime/runtime.php /tmp/runtime-build/src /tmp/runtime-build/templates ./ \
85-
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev
85+
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev --optimize-autoloader --no-ansi --no-interaction && find /opt/vendor -type d -name "tests" -exec rm -rf {} + && find /opt/vendor -type d -name "test" -exec rm -rf {} + && find /opt/vendor -type d -name "docs" -exec rm -rf {} + && find /opt/vendor -type f -name "*.md" -delete && find /opt/vendor -type f -name "phpunit.xml*" -delete
8686

8787
# Layer Assembly
8888
RUN mkdir -p /tmp/layer/bin /tmp/layer/ymir/bin /tmp/layer/lib /tmp/layer/ymir/etc/php/conf.d /tmp/layer/ymir/etc/php-fpm.d && rm -rf /tmp/layer/ymir/lib && ln -s ../lib /tmp/layer/ymir/lib
@@ -95,7 +95,7 @@ RUN cp ${INSTALL_DIR}/lib/libsqlite3.so* /tmp/layer/lib/ && cp ${INSTALL_DIR}/li
9595
COPY shared/copy-dependencies.php /tmp/copy-dependencies.php
9696
RUN ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/ymir/bin /tmp/layer/lib && \
9797
PHP_EXT_DIR=$(${INSTALL_DIR}/bin/php-config --extension-dir) && ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/lib/php/extensions/$(basename ${PHP_EXT_DIR}) /tmp/layer/lib
98-
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true
98+
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true && find /tmp/layer/lib -type f -name "*.a" -delete && find /tmp/layer/lib -type f -name "*.la" -delete
9999
COPY shared/php.ini /tmp/layer/ymir/etc/php/php.ini
100100
COPY shared/php-fpm.conf /tmp/layer/ymir/etc/php-fpm.d/php-fpm.conf
101101
RUN sed -i '/extension=msgpack.so/d' /tmp/layer/ymir/etc/php/php.ini && \

runtime/php-73/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ RUN curl -Ls https://pecl.php.net/get/imagick | tar xz && cd imagick-*/ && ${INS
8282
RUN curl -sS https://getcomposer.org/installer | ${INSTALL_DIR}/bin/php -- --install-dir=${INSTALL_DIR}/bin/ --filename=composer
8383
RUN git clone https://github.com/ymirapp/php-runtime.git /tmp/runtime-build && cd /tmp/runtime-build && git checkout tags/v1.17.1 && cd /opt \
8484
&& cp -R /tmp/runtime-build/composer.json /tmp/runtime-build/composer.lock /tmp/runtime-build/runtime/bootstrap /tmp/runtime-build/runtime/runtime.php /tmp/runtime-build/src /tmp/runtime-build/templates ./ \
85-
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev
85+
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev --optimize-autoloader --no-ansi --no-interaction && find /opt/vendor -type d -name "tests" -exec rm -rf {} + && find /opt/vendor -type d -name "test" -exec rm -rf {} + && find /opt/vendor -type d -name "docs" -exec rm -rf {} + && find /opt/vendor -type f -name "*.md" -delete && find /opt/vendor -type f -name "phpunit.xml*" -delete
8686

8787
# Layer Assembly
8888
RUN mkdir -p /tmp/layer/bin /tmp/layer/ymir/bin /tmp/layer/lib /tmp/layer/ymir/etc/php/conf.d /tmp/layer/ymir/etc/php-fpm.d && rm -rf /tmp/layer/ymir/lib && ln -s ../lib /tmp/layer/ymir/lib
@@ -95,7 +95,7 @@ RUN cp ${INSTALL_DIR}/lib/libsqlite3.so* /tmp/layer/lib/ && cp ${INSTALL_DIR}/li
9595
COPY shared/copy-dependencies.php /tmp/copy-dependencies.php
9696
RUN ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/ymir/bin /tmp/layer/lib && \
9797
PHP_EXT_DIR=$(${INSTALL_DIR}/bin/php-config --extension-dir) && ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/lib/php/extensions/$(basename ${PHP_EXT_DIR}) /tmp/layer/lib
98-
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true
98+
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true && find /tmp/layer/lib -type f -name "*.a" -delete && find /tmp/layer/lib -type f -name "*.la" -delete
9999
COPY shared/php.ini /tmp/layer/ymir/etc/php/php.ini
100100
COPY shared/php-fpm.conf /tmp/layer/ymir/etc/php-fpm.d/php-fpm.conf
101101
RUN sed -i '/extension=msgpack.so/d' /tmp/layer/ymir/etc/php/php.ini

runtime/php-74/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ RUN cp relay.ini ${INSTALL_DIR}/etc/php/conf.d/50-relay.ini; PHP_EXT_DIR=$(${INS
8383
RUN curl -sS https://getcomposer.org/installer | ${INSTALL_DIR}/bin/php -- --install-dir=${INSTALL_DIR}/bin/ --filename=composer
8484
RUN git clone https://github.com/ymirapp/php-runtime.git /tmp/runtime-build && cd /tmp/runtime-build && git checkout tags/v1.17.1 && cd /opt \
8585
&& cp -R /tmp/runtime-build/composer.json /tmp/runtime-build/composer.lock /tmp/runtime-build/runtime/bootstrap /tmp/runtime-build/runtime/runtime.php /tmp/runtime-build/src /tmp/runtime-build/templates ./ \
86-
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev
86+
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev --optimize-autoloader --no-ansi --no-interaction && find /opt/vendor -type d -name "tests" -exec rm -rf {} + && find /opt/vendor -type d -name "test" -exec rm -rf {} + && find /opt/vendor -type d -name "docs" -exec rm -rf {} + && find /opt/vendor -type f -name "*.md" -delete && find /opt/vendor -type f -name "phpunit.xml*" -delete
8787

8888
# Layer Assembly
8989
RUN mkdir -p /tmp/layer/bin /tmp/layer/ymir/bin /tmp/layer/lib /tmp/layer/ymir/etc/php/conf.d /tmp/layer/ymir/etc/php-fpm.d && rm -rf /tmp/layer/ymir/lib && ln -s ../lib /tmp/layer/ymir/lib
@@ -95,7 +95,7 @@ RUN cp ${INSTALL_DIR}/lib/libsqlite3.so* /tmp/layer/lib/ && cp ${INSTALL_DIR}/li
9595
cp ${INSTALL_DIR}/lib/libMagickWand-7.Q16HDRI.so* /tmp/layer/lib/ && cp ${INSTALL_DIR}/lib/libMagickCore-7.Q16HDRI.so* /tmp/layer/lib/
9696
COPY shared/copy-dependencies.php /tmp/copy-dependencies.php
9797
RUN ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/ymir/bin /tmp/layer/lib && ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/lib/php/extensions /tmp/layer/lib
98-
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true
98+
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true && find /tmp/layer/lib -type f -name "*.a" -delete && find /tmp/layer/lib -type f -name "*.la" -delete
9999
COPY shared/php.ini /tmp/layer/ymir/etc/php/php.ini
100100
COPY shared/php-fpm.conf /tmp/layer/ymir/etc/php-fpm.d/php-fpm.conf
101101

runtime/php-80/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ RUN cp relay.ini ${INSTALL_DIR}/etc/php/conf.d/50-relay.ini; PHP_EXT_DIR=$(${INS
8383
RUN curl -sS https://getcomposer.org/installer | ${INSTALL_DIR}/bin/php -- --install-dir=${INSTALL_DIR}/bin/ --filename=composer
8484
RUN git clone https://github.com/ymirapp/php-runtime.git /tmp/runtime-build && cd /tmp/runtime-build && git checkout tags/v1.17.1 && cd /opt \
8585
&& cp -R /tmp/runtime-build/composer.json /tmp/runtime-build/composer.lock /tmp/runtime-build/runtime/bootstrap /tmp/runtime-build/runtime/runtime.php /tmp/runtime-build/src /tmp/runtime-build/templates ./ \
86-
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev
86+
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev --optimize-autoloader --no-ansi --no-interaction && find /opt/vendor -type d -name "tests" -exec rm -rf {} + && find /opt/vendor -type d -name "test" -exec rm -rf {} + && find /opt/vendor -type d -name "docs" -exec rm -rf {} + && find /opt/vendor -type f -name "*.md" -delete && find /opt/vendor -type f -name "phpunit.xml*" -delete
8787

8888
# Layer Assembly
8989
RUN mkdir -p /tmp/layer/bin /tmp/layer/ymir/bin /tmp/layer/lib /tmp/layer/ymir/etc/php/conf.d /tmp/layer/ymir/etc/php-fpm.d && rm -rf /tmp/layer/ymir/lib && ln -s ../lib /tmp/layer/ymir/lib
@@ -95,7 +95,7 @@ RUN cp ${INSTALL_DIR}/lib/libsqlite3.so* /tmp/layer/lib/ && cp ${INSTALL_DIR}/li
9595
cp ${INSTALL_DIR}/lib/libMagickWand-7.Q16HDRI.so* /tmp/layer/lib/ && cp ${INSTALL_DIR}/lib/libMagickCore-7.Q16HDRI.so* /tmp/layer/lib/
9696
COPY shared/copy-dependencies.php /tmp/copy-dependencies.php
9797
RUN ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/ymir/bin /tmp/layer/lib && ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/lib/php/extensions /tmp/layer/lib
98-
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true
98+
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true && find /tmp/layer/lib -type f -name "*.a" -delete && find /tmp/layer/lib -type f -name "*.la" -delete
9999
COPY shared/php.ini /tmp/layer/ymir/etc/php/php.ini
100100
COPY shared/php-fpm.conf /tmp/layer/ymir/etc/php-fpm.d/php-fpm.conf
101101

runtime/php-81/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ RUN cp relay.ini ${INSTALL_DIR}/etc/php/conf.d/50-relay.ini; PHP_EXT_DIR=$(${INS
8181
RUN curl -sS https://getcomposer.org/installer | ${INSTALL_DIR}/bin/php -- --install-dir=${INSTALL_DIR}/bin/ --filename=composer
8282
RUN git clone https://github.com/ymirapp/php-runtime.git /tmp/runtime-build && cd /tmp/runtime-build && git checkout tags/v1.17.1 && cd /opt \
8383
&& cp -R /tmp/runtime-build/composer.json /tmp/runtime-build/composer.lock /tmp/runtime-build/runtime/bootstrap /tmp/runtime-build/runtime/runtime.php /tmp/runtime-build/src /tmp/runtime-build/templates ./ \
84-
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev
84+
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev --optimize-autoloader --no-ansi --no-interaction && find /opt/vendor -type d -name "tests" -exec rm -rf {} + && find /opt/vendor -type d -name "test" -exec rm -rf {} + && find /opt/vendor -type d -name "docs" -exec rm -rf {} + && find /opt/vendor -type f -name "*.md" -delete && find /opt/vendor -type f -name "phpunit.xml*" -delete
8585

8686
# Layer Assembly
8787
RUN mkdir -p /tmp/layer/bin /tmp/layer/ymir/bin /tmp/layer/lib /tmp/layer/ymir/etc/php/conf.d /tmp/layer/ymir/etc/php-fpm.d && rm -rf /tmp/layer/ymir/lib && ln -s ../lib /tmp/layer/ymir/lib
@@ -93,7 +93,7 @@ RUN cp ${INSTALL_DIR}/lib/libsqlite3.so* /tmp/layer/lib/ && cp ${INSTALL_DIR}/li
9393
cp ${INSTALL_DIR}/lib/libMagickWand-7.Q16HDRI.so* /tmp/layer/lib/ && cp ${INSTALL_DIR}/lib/libMagickCore-7.Q16HDRI.so* /tmp/layer/lib/
9494
COPY shared/copy-dependencies.php /tmp/copy-dependencies.php
9595
RUN ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/ymir/bin /tmp/layer/lib && ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/lib/php/extensions /tmp/layer/lib
96-
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true
96+
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true && find /tmp/layer/lib -type f -name "*.a" -delete && find /tmp/layer/lib -type f -name "*.la" -delete
9797
COPY shared/php.ini /tmp/layer/ymir/etc/php/php.ini
9898
COPY shared/php-fpm.conf /tmp/layer/ymir/etc/php-fpm.d/php-fpm.conf
9999

runtime/php-82/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ RUN cp relay.ini ${INSTALL_DIR}/etc/php/conf.d/50-relay.ini; PHP_EXT_DIR=$(${INS
8181
RUN curl -sS https://getcomposer.org/installer | ${INSTALL_DIR}/bin/php -- --install-dir=${INSTALL_DIR}/bin/ --filename=composer
8282
RUN git clone https://github.com/ymirapp/php-runtime.git /tmp/runtime-build && cd /tmp/runtime-build && git checkout tags/v1.17.1 && cd /opt \
8383
&& cp -R /tmp/runtime-build/composer.json /tmp/runtime-build/composer.lock /tmp/runtime-build/runtime/bootstrap /tmp/runtime-build/runtime/runtime.php /tmp/runtime-build/src /tmp/runtime-build/templates ./ \
84-
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev
84+
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev --optimize-autoloader --no-ansi --no-interaction && find /opt/vendor -type d -name "tests" -exec rm -rf {} + && find /opt/vendor -type d -name "test" -exec rm -rf {} + && find /opt/vendor -type d -name "docs" -exec rm -rf {} + && find /opt/vendor -type f -name "*.md" -delete && find /opt/vendor -type f -name "phpunit.xml*" -delete
8585

8686
# Layer Assembly
8787
RUN mkdir -p /tmp/layer/bin /tmp/layer/ymir/bin /tmp/layer/lib /tmp/layer/ymir/etc/php/conf.d /tmp/layer/ymir/etc/php-fpm.d && rm -rf /tmp/layer/ymir/lib && ln -s ../lib /tmp/layer/ymir/lib
@@ -93,7 +93,7 @@ RUN cp ${INSTALL_DIR}/lib/libsqlite3.so* /tmp/layer/lib/ && cp ${INSTALL_DIR}/li
9393
cp ${INSTALL_DIR}/lib/libMagickWand-7.Q16HDRI.so* /tmp/layer/lib/ && cp ${INSTALL_DIR}/lib/libMagickCore-7.Q16HDRI.so* /tmp/layer/lib/
9494
COPY shared/copy-dependencies.php /tmp/copy-dependencies.php
9595
RUN ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/ymir/bin /tmp/layer/lib && ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/lib/php/extensions /tmp/layer/lib
96-
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true
96+
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true && find /tmp/layer/lib -type f -name "*.a" -delete && find /tmp/layer/lib -type f -name "*.la" -delete
9797
COPY shared/php.ini /tmp/layer/ymir/etc/php/php.ini
9898
COPY shared/php-fpm.conf /tmp/layer/ymir/etc/php-fpm.d/php-fpm.conf
9999

runtime/php-83/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ RUN cp relay.ini ${INSTALL_DIR}/etc/php/conf.d/50-relay.ini; PHP_EXT_DIR=$(${INS
8181
RUN curl -sS https://getcomposer.org/installer | ${INSTALL_DIR}/bin/php -- --install-dir=${INSTALL_DIR}/bin/ --filename=composer
8282
RUN git clone https://github.com/ymirapp/php-runtime.git /tmp/runtime-build && cd /tmp/runtime-build && git checkout tags/v1.17.1 && cd /opt \
8383
&& cp -R /tmp/runtime-build/composer.json /tmp/runtime-build/composer.lock /tmp/runtime-build/runtime/bootstrap /tmp/runtime-build/runtime/runtime.php /tmp/runtime-build/src /tmp/runtime-build/templates ./ \
84-
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev
84+
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev --optimize-autoloader --no-ansi --no-interaction && find /opt/vendor -type d -name "tests" -exec rm -rf {} + && find /opt/vendor -type d -name "test" -exec rm -rf {} + && find /opt/vendor -type d -name "docs" -exec rm -rf {} + && find /opt/vendor -type f -name "*.md" -delete && find /opt/vendor -type f -name "phpunit.xml*" -delete
8585

8686
# Layer Assembly
8787
RUN mkdir -p /tmp/layer/bin /tmp/layer/ymir/bin /tmp/layer/lib /tmp/layer/ymir/etc/php/conf.d /tmp/layer/ymir/etc/php-fpm.d && rm -rf /tmp/layer/ymir/lib && ln -s ../lib /tmp/layer/ymir/lib
@@ -93,7 +93,7 @@ RUN cp ${INSTALL_DIR}/lib/libsqlite3.so* /tmp/layer/lib/ && cp ${INSTALL_DIR}/li
9393
cp ${INSTALL_DIR}/lib/libMagickWand-7.Q16HDRI.so* /tmp/layer/lib/ && cp ${INSTALL_DIR}/lib/libMagickCore-7.Q16HDRI.so* /tmp/layer/lib/
9494
COPY shared/copy-dependencies.php /tmp/copy-dependencies.php
9595
RUN ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/ymir/bin /tmp/layer/lib && ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/lib/php/extensions /tmp/layer/lib
96-
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true
96+
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true && find /tmp/layer/lib -type f -name "*.a" -delete && find /tmp/layer/lib -type f -name "*.la" -delete
9797
COPY shared/php.ini /tmp/layer/ymir/etc/php/php.ini
9898
COPY shared/php-fpm.conf /tmp/layer/ymir/etc/php-fpm.d/php-fpm.conf
9999

runtime/php-84/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ RUN cp relay.ini ${INSTALL_DIR}/etc/php/conf.d/50-relay.ini; PHP_EXT_DIR=$(${INS
8181
RUN curl -sS https://getcomposer.org/installer | ${INSTALL_DIR}/bin/php -- --install-dir=${INSTALL_DIR}/bin/ --filename=composer
8282
RUN git clone https://github.com/ymirapp/php-runtime.git /tmp/runtime-build && cd /tmp/runtime-build && git checkout tags/v1.17.1 && cd /opt \
8383
&& cp -R /tmp/runtime-build/composer.json /tmp/runtime-build/composer.lock /tmp/runtime-build/runtime/bootstrap /tmp/runtime-build/runtime/runtime.php /tmp/runtime-build/src /tmp/runtime-build/templates ./ \
84-
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev
84+
&& chmod 0555 /opt/bootstrap /opt/runtime.php && /opt/ymir/bin/php /opt/ymir/bin/composer install --no-dev --optimize-autoloader --no-ansi --no-interaction && find /opt/vendor -type d -name "tests" -exec rm -rf {} + && find /opt/vendor -type d -name "test" -exec rm -rf {} + && find /opt/vendor -type d -name "docs" -exec rm -rf {} + && find /opt/vendor -type f -name "*.md" -delete && find /opt/vendor -type f -name "phpunit.xml*" -delete
8585

8686
# Layer Assembly
8787
RUN mkdir -p /tmp/layer/bin /tmp/layer/ymir/bin /tmp/layer/lib /tmp/layer/ymir/etc/php/conf.d /tmp/layer/ymir/etc/php-fpm.d && rm -rf /tmp/layer/ymir/lib && ln -s ../lib /tmp/layer/ymir/lib
@@ -93,7 +93,7 @@ RUN cp ${INSTALL_DIR}/lib/libsqlite3.so* /tmp/layer/lib/ && cp ${INSTALL_DIR}/li
9393
cp ${INSTALL_DIR}/lib/libMagickWand-7.Q16HDRI.so* /tmp/layer/lib/ && cp ${INSTALL_DIR}/lib/libMagickCore-7.Q16HDRI.so* /tmp/layer/lib/
9494
COPY shared/copy-dependencies.php /tmp/copy-dependencies.php
9595
RUN ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/ymir/bin /tmp/layer/lib && ${INSTALL_DIR}/bin/php /tmp/copy-dependencies.php /tmp/layer/lib/php/extensions /tmp/layer/lib
96-
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true
96+
RUN find /tmp/layer/ymir/bin -type f -exec strip --strip-all {} + || true && find /tmp/layer/lib -type f -name "*.so*" -exec strip --strip-unneeded {} + || true && find /tmp/layer/lib -type f -name "*.a" -delete && find /tmp/layer/lib -type f -name "*.la" -delete
9797
COPY shared/php.ini /tmp/layer/ymir/etc/php/php.ini
9898
COPY shared/php-fpm.conf /tmp/layer/ymir/etc/php-fpm.d/php-fpm.conf
9999

0 commit comments

Comments
 (0)