File: Dockerfile.prc_test.centos

package info (click to toggle)
python-irodsclient 3.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,352 kB
  • sloc: python: 16,650; xml: 525; sh: 104; awk: 5; sql: 3; makefile: 3
file content (29 lines) | stat: -rw-r--r-- 1,049 bytes parent folder | download
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