Dockerfile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. FROM ubuntu:22.04
  2. ARG DEBIAN_FRONTEND=noninteractive
  3. # WARNING: DON'T PUT A SPACE AFTER ANY BACKSLASH OR APT WILL BREAK
  4. # One -q produces output suitable for logging (mostly hides
  5. # progress indicators)
  6. RUN apt-get -yqq update && \
  7. apt-get -yqq install \
  8. -o Dpkg::Options::="--force-confdef" \
  9. -o Dpkg::Options::="--force-confold" \
  10. cloc \
  11. curl \
  12. gcc \
  13. git-core \
  14. gosu \
  15. # Needed for mysqlclient
  16. libmysqlclient-dev \
  17. libpq-dev \
  18. pkg-config \
  19. python3 \
  20. python3-dev \
  21. python3-pip \
  22. siege \
  23. software-properties-common
  24. RUN pip3 install \
  25. colorama==0.3.1 \
  26. docker==4.0.2 \
  27. mysqlclient \
  28. psutil \
  29. psycopg2-binary \
  30. pymongo==3.13.0 \
  31. # urllib3 incompatibility:
  32. # https://github.com/docker/docker-py/issues/3113#issuecomment-1525500104
  33. requests==2.28.1
  34. # Collect resource usage statistics
  35. ARG DOOL_VERSION=v1.2.0
  36. WORKDIR /tmp
  37. RUN curl -LSs "https://github.com/scottchiefbaker/dool/archive/${DOOL_VERSION}.tar.gz" | \
  38. tar --strip-components=1 -xz && \
  39. ./install.py
  40. # Check if the group ID is already created
  41. ARG GROUP_ID
  42. RUN if ! getent group "$GROUP_ID"; then \
  43. addgroup --gid "$GROUP_ID" user; \
  44. fi
  45. # Check if the user ID is already created
  46. ARG USER_ID
  47. RUN if ! getent passwd "$USER_ID"; then \
  48. adduser --disabled-password --gecos '' --gid "$GROUP_ID" --uid "$USER_ID" user; \
  49. fi
  50. ENV FWROOT=/FrameworkBenchmarks USER_ID="$USER_ID"
  51. ENV PYTHONPATH="$FWROOT"
  52. ENTRYPOINT ["/FrameworkBenchmarks/entrypoint.sh"]