generated from RedHatQE/python-template-repository
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
32 lines (26 loc) · 1.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM python:3.12
EXPOSE 5000
ENV PRE_COMMIT_HOME=/tmp
ENV GOCACHE=/tmp/.cache/go-build
# Install the Rosa CLI
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/clients/rosa/latest/rosa-linux.tar.gz --output /tmp/rosa-linux.tar.gz \
&& tar xvf /tmp/rosa-linux.tar.gz --no-same-owner \
&& mv rosa /usr/bin/rosa \
&& chmod +x /usr/bin/rosa \
&& rosa version
COPY pyproject.toml poetry.lock README.md /ci-jobs-trigger/
COPY ci_jobs_trigger/ /ci-jobs-trigger/ci_jobs_trigger/
WORKDIR /ci-jobs-trigger
# Set OCM_CONFIG to save ocm credentials for login
RUN mkdir -p config/ocm && \
chgrp -R 0 /ci-jobs-trigger/config/ocm && \
chmod -R g=u /ci-jobs-trigger/config/ocm
ENV OCM_CONFIG=/ci-jobs-trigger/config/ocm/ocm.json
RUN python3 -m pip install pip --upgrade \
&& python3 -m pip install poetry pre-commit \
&& poetry config cache-dir /ci-jobs-trigger \
&& poetry config virtualenvs.in-project true \
&& poetry config installer.max-workers 10 \
&& poetry config --list \
&& poetry install
ENTRYPOINT ["poetry", "run", "python3", "ci_jobs_trigger/app.py"]