Dockerfile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. FROM ubuntu:18.04
  2. ARG USER_ID
  3. ARG GROUP_ID
  4. ARG DEBIAN_FRONTEND=noninteractive
  5. # WARNING: DON'T PUT A SPACE AFTER ANY BACKSLASH OR APT WILL BREAK
  6. # One -q produces output suitable for logging (mostly hides
  7. # progress indicators)
  8. RUN apt-get -yqq update && apt-get -yqq install \
  9. -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
  10. cloc \
  11. dstat `# Collect resource usage statistics` \
  12. git-core \
  13. libmysqlclient-dev `# Needed for MySQL-python` \
  14. libpq-dev \
  15. python-dev \
  16. python-pip \
  17. siege \
  18. software-properties-common && \
  19. pip install \
  20. colorama==0.3.1 \
  21. docker==4.0.2 \
  22. MySQL-python \
  23. psutil \
  24. psycopg2-binary \
  25. pymongo \
  26. requests && \
  27. # Fix for docker-py trying to import one package from the wrong location
  28. cp -r /usr/local/lib/python2.7/dist-packages/backports/ssl_match_hostname \
  29. /usr/lib/python2.7/dist-packages/backports
  30. ENV FWROOT=/FrameworkBenchmarks PYTHONPATH=/FrameworkBenchmarks
  31. # Drop permissions of user to match those of the host system
  32. RUN addgroup --gid $GROUP_ID user
  33. RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID user
  34. USER user
  35. ENTRYPOINT ["python", "/FrameworkBenchmarks/toolset/run-tests.py"]