You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
899 B
39 lines
899 B
# syntax=docker/dockerfile:1 |
|
|
|
FROM debian:bookworm AS build |
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \ |
|
build-essential \ |
|
cmake \ |
|
ninja-build \ |
|
git \ |
|
ca-certificates \ |
|
curl \ |
|
zip \ |
|
unzip \ |
|
tar \ |
|
pkg-config \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
ENV VCPKG_ROOT=/opt/vcpkg |
|
RUN git clone --depth 1 https://github.com/microsoft/vcpkg.git ${VCPKG_ROOT} \ |
|
&& ${VCPKG_ROOT}/bootstrap-vcpkg.sh -disableMetrics |
|
|
|
WORKDIR /app |
|
COPY vcpkg.json CMakeLists.txt ./ |
|
COPY src ./src |
|
COPY scripts ./scripts |
|
|
|
RUN cmake -S . -B build -G Ninja \ |
|
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \ |
|
-DCMAKE_BUILD_TYPE=Release \ |
|
&& cmake --build build \ |
|
&& cmake --install build --prefix /out |
|
|
|
FROM debian:bookworm-slim |
|
|
|
WORKDIR /app |
|
COPY --from=build /out/bin/ ./ |
|
COPY scripts/run_all.sh ./ |
|
|
|
ENTRYPOINT ["/app/run_all.sh"]
|
|
|