Dockerfile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. # Build and run SQLsmith, a random query generator, ported for Materialize
  10. MZFROM ubuntu-base
  11. WORKDIR /workdir
  12. RUN apt-get update && TZ=UTC DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
  13. ca-certificates \
  14. git \
  15. cmake \
  16. make \
  17. g++ \
  18. libpqxx-dev \
  19. nlohmann-json3-dev \
  20. && apt-get clean \
  21. && rm -rf /var/lib/apt/lists/*
  22. # Rebuild since SQLsmith repo might have changed
  23. ADD https://api.github.com/repos/MaterializeInc/sqlsmith/git/refs/heads/master version.json
  24. # Build SQLsmith
  25. RUN git clone --single-branch --branch=master https://github.com/MaterializeInc/sqlsmith \
  26. && cd sqlsmith \
  27. && git checkout 5b0448c3c8c9f87654302d12c893fe173f97cbb9 \
  28. && rm -rf .git \
  29. && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=c++ . \
  30. && cmake --build . -j `nproc`
  31. ENTRYPOINT ["/usr/bin/eatmydata", "sqlsmith/sqlsmith"]