# Copyright 2020 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. FROM quay.rdoproject.org/podified-antelope-centos9/openstack-base:19f02e65741c3a6d2995ab987df1a599 ENV TOBIKO_UPDATE_REPO=true ENV USE_EXTERNAL_FILES=true USER root RUN bash /usr/local/bin/uid_gid_manage tobiko RUN dnf -y install gcc git python3 python3-devel python3-pip which findutils iproute iputils iperf3 tcpdump podman && dnf clean all && rm -rf /var/cache/dnf RUN cp /usr/share/tcib/container-images/tcib/base/tobiko/tobiko_sudoers /etc/sudoers.d/tobiko_sudoers RUN chmod 440 /etc/sudoers.d/tobiko_sudoers RUN mkdir -p /var/lib/tempest/external_files RUN if [ 'centos' == 'rhel' ];then if [ -n "$(rpm -qa redhat-release)" ];then dnf -y remove python3-chardet; fi ; fi RUN curl -s -L https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-linux.tar.gz | tar -zxvf - -C /usr/local/bin/ RUN git clone https://opendev.org/x/tobiko /usr/local/src/tobiko RUN python3 -m pip install --upgrade setuptools pip RUN pip install -e /usr/local/src/tobiko -c /usr/local/src/tobiko/upper-constraints.txt -r /usr/local/src/tobiko/extra-requirements.txt RUN python3 -m pip install 'tox==4.13' RUN cp /usr/share/tcib/container-images/tcib/base/tobiko/run_tobiko.sh /usr/local/bin/run_tobiko.sh RUN chmod +x /usr/local/bin/run_tobiko.sh RUN chown -R tobiko.tobiko /var/lib/tobiko ENTRYPOINT ["/usr/local/bin/run_tobiko.sh"] USER tobiko