Dockerfile.build 880 B

1234567891011121314151617181920
  1. ARG BASE_IMAGE=smartbotic-vectorapi-build-base:debian13
  2. FROM ${BASE_IMAGE} AS builder
  3. ARG BUILD_VERSION=0.1.0
  4. ARG BUILD_DEB_REVISION=1
  5. # The runner vendors QuickJS from GitHub at configure time; the build network
  6. # already reaches GitHub for cpp-httplib, so this adds no new requirement.
  7. ARG BUILD_RUNNER=ON
  8. # Passed by build.sh. Without this the container has no .git, so the commit
  9. # probe fails and the shipped deb reports "unknown".
  10. ARG BUILD_GIT_COMMIT=unknown
  11. WORKDIR /build
  12. COPY . /build/
  13. RUN cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_WEBUI=ON -DBUILD_TESTS=OFF \
  14. -DSVAPI_GIT_COMMIT="${BUILD_GIT_COMMIT}" \
  15. -DBUILD_RUNNER=${BUILD_RUNNER} -S . \
  16. && cmake --build build -j"$(nproc)"
  17. RUN OUTPUT_DIR=/packages BUILD_DEB_REVISION=${BUILD_DEB_REVISION} packaging/deb/create-debs.sh
  18. FROM scratch AS packages
  19. COPY --from=builder /packages/*.deb /