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 centos:7 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 21 22ARG github_repo=jmcgeheeiv/pyfakefs 23ARG github_branch=master 24 25RUN yum install -y python3-pip unzip wget 26 27RUN useradd -u 1000 pyfakefs 28 29RUN mkdir -p work \ 30 && wget https://github.com/$github_repo/archive/$github_branch.zip \ 31 && unzip $github_branch.zip -d work 32RUN WORK_DIR=`ls -d work/*`; mv $WORK_DIR work/pyfakefs 33RUN chown -R pyfakefs:pyfakefs work/pyfakefs 34WORKDIR work/pyfakefs 35RUN pip3 install -r requirements.txt 36RUN pip3 install -r extra_requirements.txt 37 38USER pyfakefs 39ENV PYTHONPATH work/pyfakefs 40ENV TEST_REAL_FS=1 41CMD ["python3", "-m", "pyfakefs.tests.all_tests"] 42