Updated composer cache settings
Build and Push alpine Image / Build and push image (push) Failing after 25s Details
Build and Push Ubuntu Image / Build and push image (push) Has been cancelled Details

This commit is contained in:
Aditya Prima 2024-03-24 14:54:03 +07:00
parent 056872ead4
commit bad61c411d
1 changed files with 11 additions and 0 deletions

View File

@ -53,5 +53,16 @@ RUN --mount=type=cache,target=/var/cache/apk \
ADD https://getcomposer.org/installer ./composer-setup.php
RUN php composer-setup.php --version=${COMPOSER_VERSION} && mv composer.phar /usr/local/bin/composer && rm -f ./composer-setup.php
# SET COMPOSER HOME
ENV COMPOSER_HOME /usr/local/share/composer
ENV COMPOSER_CACHE_DIR ${COMPOSER_HOME}/cache
RUN mkdir -p $COMPOSER_HOME && \
composer config --global home ${COMPOSER_HOME} \
composer config --global cache-dir ${COMPOSER_CACHE_DIR}
# CREATE CACHES DIR FOR COMPOSER
RUN mkdir -p ${COMPOSER_CACHE_DIR}/{files,repo,vcs}
# CLEAN APK CACHES
RUN rm -vrf /var/cache/apk/*