Updated composer cache settings
Build and Push alpine Image / Build and push image (push) Successful in 3m31s Details
Build and Push Ubuntu Image / Build and push image (push) Successful in 3m40s Details

This commit is contained in:
Aditya Prima 2024-03-24 14:57:35 +07:00
parent bad61c411d
commit a7ff52150d
2 changed files with 8 additions and 5 deletions

View File

@ -57,12 +57,8 @@ RUN php composer-setup.php --version=${COMPOSER_VERSION} && mv composer.phar /us
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/*
RUN rm -vrf /var/cache/apk/* && rm -rf /root/.composer; exit 0

View File

@ -18,3 +18,10 @@ RUN --mount=type=cache,target=/var/cache/apt/archives \
# DOWNLOAD AND INSTALL COMPOSER
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
# CREATE CACHES DIR FOR COMPOSER
RUN mkdir -p ${COMPOSER_CACHE_DIR}/{files,repo,vcs}