-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.slave
More file actions
46 lines (35 loc) · 1.79 KB
/
Dockerfile.slave
File metadata and controls
46 lines (35 loc) · 1.79 KB
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
43
44
45
46
FROM debian:trixie AS build
RUN apt-get -y update && apt-get install -y \
git cmake build-essential libmariadb-dev-compat \
libboost-filesystem1.83-dev libboost-system1.83-dev libboost-chrono1.83-dev \
libboost-thread1.83-dev libboost-date-time1.83-dev libboost-regex1.83-dev libstorm-dev \
curl gnupg ca-certificates
# Add xpam repository for bncsutil
RUN mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://repo.xpam.pl/repository/repokeys/public/debian-trixie-xpam.asc \
-o /etc/apt/keyrings/debian-trixie-xpam.asc \
&& chmod 644 /etc/apt/keyrings/debian-trixie-xpam.asc \
&& printf "Types: deb\nURIs: https://repo.xpam.pl/repository/debian-trixie-xpam/\nSuites: trixie\nComponents: main\nSigned-By: /etc/apt/keyrings/debian-trixie-xpam.asc\n" \
> /etc/apt/sources.list.d/xpam.sources \
&& apt-get -y update \
&& apt-get -y install bncsutil
WORKDIR /app
COPY CMake ./CMake
COPY ghost ./ghost
COPY common ./common
COPY README.md LICENSE CMakeLists.txt .
RUN cmake -B build -DCMAKE_BUILD_TYPE=Release \
&& cmake --build build --config Release --target pd-slave
FROM debian:trixie AS runtime
RUN apt-get update && apt-get -y install ca-certificates
COPY --from=build /etc/apt/keyrings/debian-trixie-xpam.asc /etc/apt/keyrings/debian-trixie-xpam.asc
COPY --from=build /etc/apt/sources.list.d/xpam.sources /etc/apt/sources.list.d/xpam.sources
RUN apt-get update && apt-get install -y \
libboost-filesystem1.83 libboost-system1.83 libboost-chrono1.83 \
libboost-thread1.83 libboost-date-time1.83 libboost-regex1.83 \
bncsutil libstorm9 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=build /app/build/ghost/pd-slave-1.0.1 .
COPY ghost/didyouknow.txt ghost/gameloaded.txt ghost/gameover.txt ghost/language.cfg ghost/ipblacklist.txt .
CMD ["/app/pd-slave-1.0.1", "s00.cfg"]