1# Copyright 2018 John McGehee. All Rights Reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15FROM registry.access.redhat.com/ubi9/ubi 16LABEL maintainer="John McGehee" 17 18ARG github_repo=pytest-dev/pyfakefs 19ARG github_branch=main 20 21RUN yum update --disablerepo=* --enablerepo=ubi-9-appstream-rpms --enablerepo=ubi-9-baseos-rpms -y 22RUN yum install -y python3-pip unzip wget 23RUN python3 --version 24 25ENV LANG en_US.UTF-8 26ENV LANGUAGE en_US:en 27ENV LC_COLLATE C.UTF-8 28 29RUN useradd pyfakefs 30 31RUN mkdir -p work \ 32 && wget https://github.com/$github_repo/archive/$github_branch.zip -O archive.zip \ 33 && unzip archive.zip -d work 34RUN WORK_DIR=`ls -d work/*`; mv $WORK_DIR work/pyfakefs 35RUN chown -R pyfakefs:pyfakefs work/pyfakefs 36WORKDIR work/pyfakefs 37RUN pip3 install -r requirements.txt 38RUN pip3 install -r extra_requirements.txt 39 40USER pyfakefs 41ENV PYTHONPATH work/pyfakefs 42ENV TEST_REAL_FS=1 43CMD ["python3", "-m", "pyfakefs.tests.all_tests"] 44