Skip to content

Commit 27f4881

Browse files
committed
add Dockerfile for testing in prow
1 parent 178b3ae commit 27f4881

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

test/Dockerfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
FROM registry.access.redhat.com/ubi8/ubi
2+
3+
ENV USER_UID=1001 \
4+
USER_NAME=openshift-python\
5+
HOME=/opt/osrcp
6+
7+
RUN yum install -y \
8+
glibc-langpack-en \
9+
git \
10+
make \
11+
python3 \
12+
python3-devel \
13+
python3-pip \
14+
python3-setuptools \
15+
&& pip3 install --no-cache-dir --upgrade setuptools pip wheel \
16+
&& yum clean all
17+
18+
COPY . /opt/osrcp
19+
20+
WORKDIR /opt/osrcp
21+
22+
RUN pip install -e .
23+
24+
RUN echo "${USER_NAME}:x:${USER_UID}:0:${USER_NAME} user:${HOME}:/sbin/nologin" >> /etc/passwd \
25+
&& chown -R "${USER_UID}:0" "${HOME}" \
26+
&& chmod -R ug+rwX "${HOME}" \
27+
&& mkdir /go \
28+
&& chown -R "${USER_UID}:0" /go \
29+
&& chmod -R ug+rwX /go
30+
31+
USER ${USER_UID}

0 commit comments

Comments
 (0)