diff --git a/deploy/Dockerfile b/deploy/Dockerfile index 02b7b78..8083656 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -7,8 +7,22 @@ RUN yum clean all \ && yum -y install python3-pip python3-pip-wheel python3-devel git \ && yum clean all -RUN git clone --depth 1 -b $VERSION https://github.com/DUNE-DAQ/connectivityserver.git -RUN python3 -m pip install /connectivityserver +ENV \ + APP_ROOT=/opt/app \ + VENV_PATH=/opt/venv \ + HOME=/opt/app \ + PYTHONUNBUFFERED=1 \ + PIP_NO_CACHE_DIR=1 \ + PATH="/opt/venv/bin:$PATH" + +RUN mkdir -p ${APP_ROOT} ${VENV_PATH} + +WORKDIR ${APP_ROOT} +RUN python3 -m venv ${VENV_PATH} \ + && git clone --depth 1 -b ${VERSION} https://github.com/DUNE-DAQ/connectivityserver.git \ + && ${VENV_PATH}/bin/pip install --no-cache-dir ./connectivityserver \ + && rm -rf /root/.cache ${HOME}/.cache ${VENV_PATH}/pip-selfcheck.json COPY --chmod=755 entrypoint.sh / + ENTRYPOINT ["/entrypoint.sh"] diff --git a/deploy/connectivityserver.yaml b/deploy/connectivityserver.yaml index 7054df4..56b5f4f 100644 --- a/deploy/connectivityserver.yaml +++ b/deploy/connectivityserver.yaml @@ -39,6 +39,7 @@ spec: - key: node-role.kubernetes.io/worker operator: Exists automountServiceAccountToken: false + hostUsers: false containers: - image: ghcr.io/dune-daq/connectivityserver:develop name: connectionservice