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