Dockerfile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. FROM ubuntu:22.04
  2. ARG USER_ID
  3. ARG GROUP_ID
  4. ARG DEBIAN_FRONTEND=noninteractive
  5. #RUN add-apt-repository universe
  6. # WARNING: DON'T PUT A SPACE AFTER ANY BACKSLASH OR APT WILL BREAK
  7. # One -q produces output suitable for logging (mostly hides
  8. # progress indicators)
  9. RUN apt-get -yqq update && apt-get -yqq install \
  10. -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
  11. cloc \
  12. curl \
  13. dstat `# Collect resource usage statistics` \
  14. gcc \
  15. git-core \
  16. gosu \
  17. libmysqlclient-dev `# Needed for MySQL-python` \
  18. libpq-dev \
  19. python2 \
  20. python2.7-dev \
  21. siege \
  22. software-properties-common
  23. RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
  24. RUN python2 get-pip.py
  25. RUN curl https://raw.githubusercontent.com/paulfitz/mysql-connector-c/master/include/my_config.h --output /usr/include/mysql/my_config.h
  26. RUN pip install \
  27. colorama==0.3.1 \
  28. docker==4.0.2 \
  29. MySQL-python \
  30. psutil \
  31. psycopg2-binary \
  32. pymongo \
  33. requests
  34. # Fix for docker-py trying to import one package from the wrong location
  35. #cp -r /usr/local/lib/python2.7/dist-packages/backports/ssl_match_hostname \
  36. # /usr/lib/python2.7/dist-packages/backports
  37. ENV FWROOT=/FrameworkBenchmarks PYTHONPATH=/FrameworkBenchmarks
  38. # Check if Group is already created
  39. RUN if ! getent group $GROUP_ID; then \
  40. addgroup --gid $GROUP_ID user; \
  41. fi
  42. # Drop permissions of user to match those of the host system
  43. # Check if the User ID is already created
  44. RUN if ! getent passwd $USER_ID; then \
  45. adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID user; \
  46. fi
  47. ENV USER_ID=$USER_ID
  48. ENTRYPOINT ["/bin/bash", "FrameworkBenchmarks/entrypoint.sh" ]