build(docker/backend): update backend Dockerfile for MOUNT_DIR and PROJECT_DIR update
This commit is contained in:
parent
04030ce6f0
commit
faf4cc8c03
@ -6,16 +6,19 @@ RUN apt-get -y update && apt-get -y install llvm
|
||||
|
||||
ENV LANG=en_US.UTF-8
|
||||
|
||||
# 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=/mnt/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}
|
||||
|
||||
RUN mkdir -p /.stack
|
||||
ENV STACK_ROOT=/.stack
|
||||
|
||||
RUN make backend-dependencies STACK_ROOT=${STACK_ROOT}
|
||||
RUN make .stack STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true
|
||||
|
||||
ENV FRADRIVE_MAKE_TARGET=backend-build
|
||||
ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} STACK_ROOT=${STACK_ROOT}
|
||||
ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true
|
||||
Reference in New Issue
Block a user