diff --git a/Dockerfile b/Dockerfile index 2548abf..66dc4a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ -FROM ubuntu:focal +FROM ubuntu:jammy ENV DEBIAN_FRONTEND=noninteractive +ENV VENV=${VENV:-"venv"} RUN apt-get update && \ apt-get install -y \ git \ @@ -21,7 +22,8 @@ RUN apt-get update && \ COPY .teuthology.yaml /root WORKDIR /teuthology_api COPY . /teuthology_api/ -RUN pip3 install -e . +RUN python3 -m venv ${VENV} +RUN /teuthology_api/${VENV}/bin/pip3 install -e . RUN mkdir /archive_dir/ -CMD sh /teuthology_api/start_container.sh +ENTRYPOINT /teuthology_api/start_container.sh diff --git a/start_container.sh b/start_container.sh old mode 100644 new mode 100755 index c6559d6..2d9919c --- a/start_container.sh +++ b/start_container.sh @@ -1,11 +1,12 @@ -#!/usr/bin/env sh +#!/usr/bin/bash set -ex trap exit TERM HOST=${TEUTHOLOGY_API_SERVER_HOST:-"0.0.0.0"} PORT=${TEUTHOLOGY_API_SERVER_PORT:-"8082"} +VENV=${VENV:-"venv"} - +source ${VENV}/bin/activate cd /teuthology_api/src/ if [ "$DEPLOYMENT" = "development" ]; then