ubuntu_16_04.dockerfile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. FROM ubuntu:16.04
  2. ENV no_proxy="127.0.0.1,localhost,kalliope.fr"
  3. # pico2wav is a multiverse package
  4. RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse" >> /etc/apt/sources.list
  5. # install packages
  6. RUN apt-get update && apt-get install -y \
  7. git python-dev libsmpeg0 libttspico-utils libsmpeg0 flac dialog \
  8. libffi-dev libffi-dev libssl-dev portaudio19-dev build-essential \
  9. 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. RUN pip install --upgrade pip gitdb
  20. # add a standart user. tests must not be ran as root
  21. RUN useradd -m -u 1000 tester
  22. RUN usermod -aG sudo tester
  23. RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
  24. # get TRAVIS environment variables
  25. ARG TRAVIS_BRANCH
  26. ARG TRAVIS_EVENT_TYPE
  27. ARG TRAVIS_PULL_REQUEST_SLUG
  28. ARG TRAVIS_PULL_REQUEST_BRANCH
  29. ENV TRAVIS_BRANCH=${TRAVIS_BRANCH}
  30. ENV TRAVIS_EVENT_TYPE=${TRAVIS_EVENT_TYPE}
  31. ENV TRAVIS_PULL_REQUEST_SLUG=${TRAVIS_PULL_REQUEST_SLUG}
  32. ENV TRAVIS_PULL_REQUEST_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH}
  33. ADD docker/clone_and_test.sh /home/tester/clone_and_test.sh
  34. RUN chown tester /home/tester/clone_and_test.sh
  35. USER tester
  36. WORKDIR /home/tester
  37. # run tests
  38. CMD ./clone_and_test.sh