-
Notifications
You must be signed in to change notification settings - Fork 7
/
Containerfile
42 lines (32 loc) · 901 Bytes
/
Containerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM --platform=$BUILDPLATFORM debian:12-slim AS builder
ARG TARGETARCH
COPY . /tmp/source
WORKDIR /tmp
RUN apt-get update \
&& \
ruek_march=$(./source/bin/march.sh) \
&& \
if [ "$ruek_march" = "x86_64" ]; then ruek_march=x86-64; fi \
&& \
apt-get install -y --no-install-recommends \
cmake ninja-build \
binutils-${ruek_march}-linux-gnu g++ \
protobuf-compiler libprotobuf-dev libprotoc-dev \
libpq-dev
RUN ruek_march=$(./source/bin/march.sh) \
&& \
cmake -B build -G Ninja -S source/ \
-DCMAKE_CXX_COMPILER_TARGET=${ruek_march}-linux-gnu \
-DCMAKE_BUILD_TYPE=Release \
-DRUEK_BUILD_TESTING=OFF
RUN cmake --build build/ --config Release
FROM debian:12-slim
RUN apt-get update \
&& \
apt-get install -y --no-install-recommends \
libpq5 \
libprotobuf32
COPY --from=builder /tmp/build/bin/ruek /opt/ruek/bin/
WORKDIR /opt/ruek
ENTRYPOINT [ "bin/ruek" ]
EXPOSE 8080