-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (31 loc) · 941 Bytes
/
Dockerfile
File metadata and controls
41 lines (31 loc) · 941 Bytes
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
FROM alpine:3.19 AS builder
RUN apk add --no-cache \
git \
make \
cmake \
python3 \
zlib-dev \
curl-dev \
clang \
boost-dev
WORKDIR /home/cubic-server
COPY CMakeLists.txt .
COPY cubic-server cubic-server
COPY generators generators
COPY blocks.cmake .
COPY boost.cmake .
COPY c_flag_overrides.cmake .
COPY cxx_flag_overrides.cmake .
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DUSE_CLANG=true -DNO_GUI=true
RUN cmake --build build -j`nproc --ignore=1`
FROM alpine:3.19 AS runner
# curl is needed because the library is not linked statically
RUN apk add --no-cache \
libstdc++ \
curl
WORKDIR /home/cubic-server
COPY --from=builder /home/cubic-server/build/CubicServer ./
COPY --from=builder /home/cubic-server/build/blocks-*.json ./
COPY --from=builder /home/cubic-server/build/registries-*.json ./
COPY --from=builder /home/cubic-server/build/assets ./
ENTRYPOINT [ "./CubicServer" ]