forked from irods/python-irodsclient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.prc_test.centos
29 lines (28 loc) · 1.02 KB
/
Dockerfile.prc_test.centos
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
ARG os_image
FROM ${os_image}
ARG log_output_dir=/tmp
ENV LOG_OUTPUT_DIR="$log_output_dir"
ARG py_N
ENV PY_N "$py_N"
RUN yum install -y epel-release
RUN yum install -y git nmap-ncat sudo
RUN yum install -y python${py_N} python${py_N}-pip
RUN useradd -md /home/user -s /bin/bash user
RUN echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
WORKDIR /home/user
COPY ./ ./repo/
RUN chown -R user repo/
USER user
RUN pip${py_N} install --user --upgrade pip==20.3.4 # - limit pip version for C7 system python2.7
RUN cd repo && python${py_N} -m pip install --user '.[tests]'
RUN python${py_N} repo/docker_build/iinit.py \
host irods-provider \
port 1247 \
user rods \
zone tempZone \
password rods
SHELL ["/bin/bash","-c"]
CMD echo "Waiting on iRODS server... " ; \
python${PY_N} repo/docker_build/recv_oneshot -h irods-provider -p 8888 -t 360 && \
sudo groupadd -o -g $(stat -c%g /irods_shared) irods && sudo usermod -aG irods user && \
newgrp irods < repo/run_python_tests.sh