diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 6f664a6f2..61a6eba6e 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -14,9 +14,12 @@ ENV CHROME_BIN=chromium RUN npm install -g n RUN n 20.17.0 +# locally these two should be identical, so that compilation results are written out into the file dir. +# in CI-pipelines these two should be different, so that the container caches the compilation results. +ARG MOUNT_DIR=/bindmount/fradrive ARG PROJECT_DIR=/fradrive RUN mkdir -p ${PROJECT_DIR} -RUN cp -r /tmp${PROJECT_DIR}/* ${PROJECT_DIR} +RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}"]; then cp -r ${MOUNT_DIR}/* ${PROJECT_DIR} ; fi WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} @@ -24,4 +27,4 @@ RUN make node_modules RUN make well-known ENV FRADRIVE_MAKE_TARGET=frontend-watch -ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} CHROME_BIN=${CHROME_BIN} \ No newline at end of file +ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} CHROME_BIN=${CHROME_BIN}