Skip to content
Snippets Groups Projects
Commit f26665c3 authored by istmxrein's avatar istmxrein
Browse files

add proper signal handling on sigterm

parent a8c94618
No related branches found
No related tags found
No related merge requests found
......@@ -35,11 +35,11 @@ LABEL maintainer="Dmitry Misharov <misharov@redhat.com>" \
WORKDIR $HOME
COPY cleanup.py env.py config.sh prepare.py run.py requirements.txt start.sh .
COPY cleanup.py env.py config.sh prepare.py run.py requirements.txt start.sh ./
RUN dnf install -y --nodocs python38-pip git-core && \
python3.8 -m venv $VENV && \
pip install wheel && \
pip install wheel dumb-init && \
pip install -r requirements.txt && \
dnf remove -y git-core && \
dnf clean all -y
......@@ -50,4 +50,5 @@ RUN chgrp -R 0 $HOME && \
USER 1001
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["./start.sh"]
#!/bin/bash
trap cleanup 1 2 3 6
trap cleanup SIGTERM
cleanup() {
gitlab-runner unregister --all-runners
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment