build(docker/frontend): prepare Dockerfile for pipeline usage
This commit is contained in:
parent
c9999d9b06
commit
fb518ac4ef
@ -1,7 +1,12 @@
|
||||
FROM debian:12.5
|
||||
ARG FROM_IMG=docker.io/library/node
|
||||
ARG FROM_TAG=20
|
||||
|
||||
FROM ${FROM_IMG}:${FROM_TAG}
|
||||
|
||||
ENV LANG=de_DE.UTF-8
|
||||
|
||||
# Basic dependencies
|
||||
RUN apt-get -y update && apt-get -y install curl npm
|
||||
RUN apt-get -y update && apt-get -y install curl
|
||||
|
||||
# Build and watch dependencies
|
||||
RUN apt-get -y update && apt-get -y install exiftool
|
||||
@ -12,21 +17,22 @@ RUN apt-get -y update && apt-get -y install chromium
|
||||
ENV CHROME_BIN=chromium
|
||||
|
||||
# TODO: use dotenv for npm version?
|
||||
RUN npm install -g n
|
||||
RUN n 20.17.0
|
||||
# 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=/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 if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r ${MOUNT_DIR}/* ${PROJECT_DIR} ; fi
|
||||
WORKDIR ${PROJECT_DIR}
|
||||
ENV HOME=${PROJECT_DIR}
|
||||
|
||||
#RUN make node_modules IN_CONTAINER=true
|
||||
#RUN make well-known IN_CONTAINER=true
|
||||
RUN make -- static
|
||||
COPY . ${PROJECT_DIR}
|
||||
|
||||
ENV FRADRIVE_MAKE_TARGET=start-frontend
|
||||
ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} IN_CONTAINER=true CHROME_BIN=${CHROME_BIN}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user