From 94eada859de2bb33ce143fdd5995920cf90fc399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Ros=C3=A9n?= Date: Tue, 26 May 2020 13:30:30 +0200 Subject: [PATCH] Run docker compose with --renew-anon-modules (-V) --- frontend/Dockerfile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 371e25c0..d0b7cd0b 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -2,14 +2,9 @@ FROM node:11 WORKDIR /frontend COPY package.json yarn.lock ./ RUN yarn install +RUN mkdir -p /frontend/.cache /frontend/.parcel-cache VOLUME /frontend/node_modules VOLUME /frontend/.cache VOLUME /frontend/.parcel-cache - -# make sure that stale caches aren't used -RUN rm -rf /frontend/node_modules/* -RUN rm -rf /frontend/.cache/* -RUN rm -rf /frontend/.parcel-cache/* - RUN yarn run parcel --version -CMD yarn start +CMD sh -c 'if [ -z "$(ls -A /frontend/.parcel-cache)" ]; then yarn start; else echo "parcel cache not empty, run docker-compose up with -V (--renew-anon-volumes)"; fi'