FROM ubuntu:24.04 ARG H_GID ARG H_UID ARG PIP_REQ_FILE RUN apt update && \ apt install -y bash \ build-essential \ git \ curl \ ca-certificates \ python3-dev \ python3-pip RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin apt-get install -y tzdata \ && cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime \ && echo "Europe/Berlin" > /etc/timezone RUN apt-get install -y vim htop \ nginx supervisor \ && rm -rf /var/lib/apt/lists # sytem and user setup RUN ln -s /usr/bin/python3 /usr/local/bin/python \ && addgroup --gid $H_GID user \ && adduser user --uid $H_UID --ingroup user --gecos "" --home /home/user/ --disabled-password RUN mkdir -p /ums-agenten/plattform/ COPY ./docker-mgmt/$PIP_REQ_FILE /ums-agenten/requirements.txt RUN pip3 install --break-system-packages --no-cache-dir -r /ums-agenten/requirements.txt \ && pip3 freeze > /ums-agenten/requirements.txt # nginx settings and startup COPY ./docker-mgmt/supervisor.conf /etc/supervisor/supervisord.conf COPY ./docker-mgmt/nginx.conf /etc/nginx/nginx.conf COPY ./docker-mgmt/app.conf /etc/nginx/sites-enabled/default # install the code of the repo COPY ./docker-mgmt/setup.py /ums-agenten/plattform/ RUN pip3 install --break-system-packages -e /ums-agenten/plattform/ WORKDIR /ums-agenten/plattform/ums/ COPY --chown=user:user ./ums/ /ums-agenten/plattform/ums/ COPY --chown=user:user ./web/ /ums-agenten/plattform/web/ # run nginx and uvicorn ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]