Dockerfile 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. FROM ubuntu:jammy
  2. ENV DEBIAN_FRONTEND noninteractive
  3. # toolchain stuff
  4. ARG cmakever="3.31.2"
  5. RUN apt-get update && apt-get install -y --no-install-recommends \
  6. curl \
  7. git \
  8. build-essential \
  9. ninja-build \
  10. xsltproc \
  11. && rm -rf /var/lib/apt/lists/* \
  12. && git config --global --add safe.directory '*' \
  13. && cd / && curl -k -L https://github.com/Kitware/CMake/releases/download/v${cmakever}/cmake-${cmakever}-linux-x86_64.tar.gz | tar -zx
  14. ENV PATH $PATH:/cmake-${cmakever}-linux-x86_64/bin
  15. # build dependencies
  16. ARG boostminorver=80
  17. RUN apt-get update && apt-get install -y --no-install-recommends \
  18. libmysqlclient-dev \
  19. libexpat-dev \
  20. libpq-dev \
  21. unixodbc-dev \
  22. libjemalloc-dev \
  23. libssl-dev \
  24. && rm -rf /var/lib/apt/lists/* \
  25. && cd / && curl -k -L https://boostorg.jfrog.io/artifactory/main/release/1.${boostminorver}.0/source/boost_1_${boostminorver}_0.tar.gz | tar -zx \
  26. && cd boost_1_${boostminorver}_0 \
  27. && ./bootstrap.sh \
  28. && ./b2 install --with-context --with-system --with-filesystem \
  29. && cd - && rm -rf /boost_1_${boostminorver}_0
  30. # test suite tools
  31. # llvm need for llvm-gcov paired to clang-16 in build env
  32. ENV llvm=16
  33. RUN apt-get update && apt-get install -y --no-install-recommends \
  34. mysql-server \
  35. php \
  36. php-mysql \
  37. php-curl \
  38. php-xml \
  39. php-dompdf \
  40. python3 \
  41. gnupg \
  42. ca-certificates \
  43. && curl -k -L https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
  44. && echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${llvm} main" >> /etc/apt/sources.list.d/llvm.list \
  45. && apt-get update \
  46. && apt-get install -y --no-install-recommends llvm-${llvm} \
  47. && rm -rf /var/lib/apt/lists/* \
  48. && mkdir -p /var/run/mysqld && chmod a+rwX /var/run/mysqld \
  49. && { mysqld & } && sleep 5 \
  50. && mysql -e "CREATE USER test@localhost; \
  51. CREATE DATABASE test; GRANT ALL PRIVILEGES ON test.* TO test@localhost; \
  52. CREATE DATABASE test1; GRANT ALL PRIVILEGES ON test1.* TO test@localhost; \
  53. CREATE DATABASE test2; GRANT ALL PRIVILEGES ON test2.* TO test@localhost; \
  54. CREATE DATABASE test3; GRANT ALL PRIVILEGES ON test3.* TO test@localhost; \
  55. CREATE DATABASE test4; GRANT ALL PRIVILEGES ON test4.* TO test@localhost; \
  56. CREATE DATABASE test5; GRANT ALL PRIVILEGES ON test5.* TO test@localhost; \
  57. CREATE DATABASE test6; GRANT ALL PRIVILEGES ON test6.* TO test@localhost; \
  58. CREATE DATABASE test7; GRANT ALL PRIVILEGES ON test7.* TO test@localhost; \
  59. CREATE DATABASE test8; GRANT ALL PRIVILEGES ON test8.* TO test@localhost; \
  60. CREATE DATABASE test9; GRANT ALL PRIVILEGES ON test9.* TO test@localhost;" \
  61. && mysqladmin shutdown
  62. ADD resource.json /opt/work/resource.json
  63. ENV CTEST_RESOURCE /opt/work/resource.json
  64. ENV PATH $PATH:/usr/lib/llvm-${llvm}/bin
  65. # testing environment
  66. RUN curl -O -k https://repo.manticoresearch.com/manticore-dev-repo.noarch.deb \
  67. && dpkg -i manticore-dev-repo.noarch.deb \
  68. && rm manticore-dev-repo.noarch.deb \
  69. && apt-get update && apt-get install -y --no-install-recommends \
  70. manticore-tzdata \
  71. && rm -rf /var/lib/apt/lists/* \
  72. && cd / && curl -k -L https://dev.mysql.com/get/Downloads/Connector-ODBC/8.3/mysql-connector-odbc-8.3.0-linux-glibc2.28-x86-64bit.tar.gz | tar -zx \
  73. && mkdir -p /work/aot && cd /work/aot \
  74. && curl -k -L https://repo.manticoresearch.com/repository/morphology/de.pak.tar.xz | tar -Jx \
  75. && curl -k -L https://repo.manticoresearch.com/repository/morphology/en.pak.tar.xz | tar -Jx \
  76. && curl -k -L https://repo.manticoresearch.com/repository/morphology/ru.pak.tar.xz | tar -Jx
  77. ADD sphinx /root/.sphinx
  78. ADD entry_point.sh /
  79. VOLUME [ "/work" ]
  80. WORKDIR /work
  81. ENTRYPOINT ["bash", "/entry_point.sh"]
  82. CMD []
  83. # docker build -t registry.gitlab.com/manticoresearch/dev/ubertests_public:331 .
  84. # docker tag registry.gitlab.com/manticoresearch/dev/ubertests_public:331 manticoresearch/ubertests_public:331
  85. # docker push manticoresearch/ubertests_public:331