FROM devfra.azurecr.io/de.fraport.build/tools:1.1.0 # debug info RUN lsb_release -a # RUN curl -k https://google.de RUN env # RUN curl -sSLk -x $HTTP_PROXY RUN apt-get -y update && apt-get -y install inotify-tools RUN apt-get -y update && apt-get -y install haskell-stack git RUN apt-get -y update && apt-get -y install alex g++ happy libghc-zlib-dev libpq-dev libsodium-dev locales locales-all pkg-config 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 if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r "${MOUNT_DIR}"/* "${PROJECT_DIR}" ; fi RUN mkdir -p "${PROJECT_DIR}/.stack" ENV STACK_ROOT="${PROJECT_DIR}/.stack" WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} RUN make -- --dependencies-backend STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true JOB=${JOB} RUN stack install yesod-bin RUN stack install hpack ENV FRADRIVE_MAKE_TARGET=--start-backend ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} STACK_ROOT="${STACK_ROOT}" IN_CONTAINER=true CONTAINER_FILE="${CONTAINER_FILE}" JOB="${JOB}" EXPOSE 3000/tcp EXPOSE 3443/tcp