debian8.dockerfile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. FROM debian:8
  2. ENV no_proxy="127.0.0.1,localhost,kalliope.fr"
  3. # Need some packages in non-free repo
  4. RUN sed -i -- 's/jessie main/jessie main contrib non-free/g' /etc/apt/sources.list
  5. # install packages
  6. RUN apt-get update && apt-get install -y \
  7. git python-dev libsmpeg0 libttspico-utils libsmpeg0 \
  8. flac dialog portaudio19-dev build-essential libssl-dev \
  9. libffi-dev sox libatlas3-base mplayer wget vim sudo\
  10. && rm -rf /var/lib/apt/lists/*
  11. # Install the last PIP
  12. RUN wget https://bootstrap.pypa.io/get-pip.py
  13. RUN python get-pip.py
  14. # fix install in container
  15. RUN pip install --upgrade pip six
  16. RUN pip install --upgrade pip pyyaml
  17. RUN pip install --upgrade pip SpeechRecognition
  18. RUN pip install --upgrade pip Werkzeug
  19. # add a standart user. tests must not be ran as root
  20. RUN useradd -m -u 1000 tester
  21. RUN usermod -aG sudo tester
  22. RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
  23. # get TRAVIS environment variables
  24. ARG TRAVIS_BRANCH
  25. ARG TRAVIS_EVENT_TYPE
  26. ARG TRAVIS_PULL_REQUEST_SLUG
  27. ARG TRAVIS_PULL_REQUEST_BRANCH
  28. ENV TRAVIS_BRANCH=${TRAVIS_BRANCH}
  29. ENV TRAVIS_EVENT_TYPE=${TRAVIS_EVENT_TYPE}
  30. ENV TRAVIS_PULL_REQUEST_SLUG=${TRAVIS_PULL_REQUEST_SLUG}
  31. ENV TRAVIS_PULL_REQUEST_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH}
  32. ADD docker/clone_and_test.sh /home/tester/clone_and_test.sh
  33. RUN chown tester /home/tester/clone_and_test.sh
  34. USER tester
  35. WORKDIR /home/tester
  36. # run tests
  37. CMD ./clone_and_test.sh