Skip to content

Commit 8c79a9c

Browse files
committed
Add access to host composer cache
1 parent 46d99d9 commit 8c79a9c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ SHELL=bash
44
.PHONY: *
55

66
DOCKER_CGROUP:=$(shell cat /proc/1/cgroup | grep docker | wc -l)
7+
COMPOSER_CACHE_DIR=$(shell composer config --global cache-dir -q || echo ${HOME}/.composer/cache)
78

89
ifneq ("$(wildcard /.dockerenv)","")
910
IN_DOCKER=TRUE
@@ -18,6 +19,7 @@ ifeq ("$(IN_DOCKER)","TRUE")
1819
else
1920
DOCKER_RUN=docker run --rm -it \
2021
-v "`pwd`:`pwd`" \
22+
-v "${COMPOSER_CACHE_DIR}:/home/app/.composer/cache" \
2123
-w "`pwd`" \
2224
"wyrihaximusnet/php:7.4-nts-alpine3.12-dev"
2325
endif

0 commit comments

Comments
 (0)