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 fedora:latest 16MAINTAINER jmcgeheeiv@users.noreply.github.com 17 18ENV LANG en_US.UTF-8 19ENV LANGUAGE en_US:en 20ENV LC_ALL en_US.UTF-8 21ARG github_repo=pytest-dev/pyfakefs 22ARG github_branch=main 23 24RUN dnf install -y python3-pip unzip wget 25 26RUN useradd pyfakefs 27 28RUN mkdir -p work \ 29 && wget https://github.com/$github_repo/archive/$github_branch.zip -O archive.zip \ 30 && unzip archive.zip -d work 31RUN WORK_DIR=`ls -d work/*`; mv $WORK_DIR work/pyfakefs 32RUN chown -R pyfakefs:pyfakefs work/pyfakefs 33WORKDIR work/pyfakefs 34RUN pip3 install -r requirements.txt 35RUN pip3 install -r extra_requirements.txt 36 37USER pyfakefs 38ENV PYTHONPATH work/pyfakefs 39ENV TEST_REAL_FS=1 40CMD ["python3", "-m", "pyfakefs.tests.all_tests"] 41