Skip to content

Commit 59a1968

Browse files
committed
Mount composer cache
1 parent 7428dc4 commit 59a1968

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ RUN <<EOF
3333
chown dev:dev /composer
3434
EOF
3535

36-
ENV COMPOSER_HOME=/composer
37-
ENV COMPOSER_CACHE_DIR=/dev/null
38-
ENV PATH="/composer/vendor/bin:${PATH}"
39-
4036
USER dev
4137

4238
RUN <<EOF
@@ -46,11 +42,15 @@ RUN <<EOF
4642
git config --global core.excludesFile '/home/dev/.gitignore'
4743
EOF
4844

49-
RUN <<EOF
45+
ENV COMPOSER_HOME=/composer
46+
ENV COMPOSER_CACHE_DIR=/composer/cache
47+
ENV PATH="/composer/vendor/bin:${PATH}"
48+
49+
RUN --mount=type=cache,target=/composer/cache,uid=${UID},gid=${GID} <<EOF
5050
set -eux
5151
composer global config allow-plugins.infection/extension-installer false
5252
composer global config allow-plugins.ergebnis/composer-normalize true
53-
composer global require --no-cache \
53+
composer global require \
5454
friendsofphp/php-cs-fixer \
5555
phpyh/coding-standard \
5656
phpstan/phpstan \

0 commit comments

Comments
 (0)