ARG DASH_ACOUSTIC FROM python:3.10 LABEL maintainer="Hannes Kath hannes.kath@dfki.de" # Define build arguments for accessing the repository ARG GITLAB_DEPLOYTOKEN_USERNAME=gitlab+deploy-token-94 ARG GITLAB_DEPLOYTOKEN_PASSWORD=gldt-TQBhFs28iZUJSwVSBfR8 # Set the Git repository URL with deploy token ARG REPO_URL=https://$GITLAB_DEPLOYTOKEN_USERNAME:$GITLAB_DEPLOYTOKEN_PASSWORD@git.ni.dfki.de/iml/cst/pam_al_ui.git # test configuration #ARG GITLAB_DEPLOYTOKEN_USERNAME=gitlab+deploy-token-96 #ARG GITLAB_DEPLOYTOKEN_PASSWORD=gldt-LiJf7Qbsgs2DsWmR3JwK #ARG REPO_URL=https://$GITLAB_DEPLOYTOKEN_USERNAME:$GITLAB_DEPLOYTOKEN_PASSWORD@git.ni.dfki.de/iml/cst/hannes-iterative-learning-pam/pam.user_interface.git # Clone the Git repository RUN git clone ${REPO_URL} /git_app # Switch to the cloned directory WORKDIR /git_app # Change to the versio branch RUN git checkout version # Install dependencies RUN pip install --upgrade pip setuptools wheel RUN python3 -m pip install -r requirements.txt ### works until here ### # Set up a new user named "user" with user ID 1000 RUN useradd -m -u 1000 user # Switch to the "user" user USER user # Set the working directory to the user's home directory WORKDIR $HOME/git_app # Make port available to the world outside this container EXPOSE 7860/tcp # Define environment variable ENV NAME Acoustic # Copy the current directory contents into the container at $HOME/app setting the owner to the user COPY --chown=user . $HOME/git_app # add directory /git_app to the save list so that it is possible to get branch, hash, tag RUN git config --global --add safe.directory /git_app # Run your application CMD ["python3", "app.py", "--host", "0.0.0.0", "--port", "7860"]