-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (43 loc) · 1.42 KB
/
Dockerfile
File metadata and controls
50 lines (43 loc) · 1.42 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM registry.access.redhat.com/ubi9/ubi
LABEL maintainer="rioliu@redhat.com"
# Declare variables
ENV PY_VER=3.12
ENV PY_BIN=python${PY_VER}
# Install Python and required system packages
RUN yum --disableplugin=subscription-manager install -y --allowerasing \
${PY_BIN} \
${PY_BIN}-devel \
krb5* \
git \
gcc \
tar \
gzip \
curl && \
yum clean all
# Install uv (fast Python package installer)
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"
# Install system-wide Python packages not in pyproject.toml
RUN uv pip install --python ${PY_BIN} --system python-bugzilla pip-system-certs
# Install OpenShift CLI (oc) based on architecture
ARG TARGETARCH
RUN case ${TARGETARCH} in \
amd64) FILE_NAME="openshift-client-linux.tar.gz" ;; \
arm64) FILE_NAME="openshift-client-linux-arm64.tar.gz" ;; \
*) echo "Unsupported architecture: ${TARGETARCH}"; exit 1 ;; \
esac && \
curl -LO "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/${FILE_NAME}" && \
tar -xzf ${FILE_NAME} && \
chmod +x oc && \
mv oc /usr/local/bin/ && \
rm ${FILE_NAME} && \
oc version --client
# Install OAR CLI
WORKDIR /usr/src/release-tests
COPY . .
RUN uv pip install --python ${PY_BIN} --system . ./prow && \
oar --help && \
oarctl --help && \
job --help && \
jobctl --help
CMD [ "/bin/bash" ]