forked from uakfdotb/ghostpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
96 lines (65 loc) · 2.22 KB
/
Dockerfile
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
FROM debian:bookworm-slim AS baseos
RUN apt-get update && \
apt-get install -y cmake git libboost-all-dev build-essential libgmp-dev zlib1g-dev libbz2-dev libmysql++-dev
FROM baseos AS bncsutil
WORKDIR /opt/build
COPY ./bncsutil ./bncsutil
RUN cd bncsutil && \
rm -rf build && \
mkdir build && \
cmake -G "Unix Makefiles" -B./build -H./ && \
cd build && \
make && \
make install
FROM baseos AS storm
WORKDIR /opt/build
COPY ./StormLib ./StormLib
RUN cd StormLib && \
rm -rf build && \
mkdir build && \
cmake -G "Unix Makefiles" -B./build -H./ && \
cd build && make && make install
FROM baseos AS casc
WORKDIR /opt/build
COPY ./CascLib ./CascLib
RUN cd CascLib && \
rm -rf build && \
mkdir build && \
cmake -G "Unix Makefiles" -B./build -H./ && \
cd build && make && make install
FROM baseos AS ghost
WORKDIR /opt/build
COPY ./ghost ./ghost
COPY ./mysql ./mysql
COPY ./zlib ./zlib
COPY --from=bncsutil /usr/local/lib/ /usr/local/lib/
COPY --from=bncsutil /usr/local/include/ /usr/local/include/
COPY --from=casc /usr/local/lib/ /usr/local/lib/
COPY --from=casc /usr/local/include/ /usr/local/include/
COPY --from=storm /usr/local/lib/ /usr/local/lib/
COPY --from=storm /usr/local/include/ /usr/local/include/
RUN cd ghost && make
FROM debian:bookworm-slim
WORKDIR /opt/bot
EXPOSE 6112/udp
EXPOSE 6113/udp
EXPOSE 6114/udp
COPY --from=ghost /opt/build/ghost/ghost++ /opt/bot/ghost++
COPY --from=bncsutil /usr/local/lib/ /usr/local/lib/
COPY --from=bncsutil /usr/local/include/ /usr/local/include/
COPY --from=casc /usr/local/lib/ /usr/local/lib/
COPY --from=casc /usr/local/include/ /usr/local/include/
COPY --from=storm /usr/local/lib/ /usr/local/lib/
COPY --from=storm /usr/local/include/ /usr/local/include/
COPY default.cfg /opt/bot/default.cfg
COPY gameloaded.txt /opt/bot/gameloaded.txt
COPY gameover.txt /opt/bot/gameover.txt
COPY ip-to-country.csv /opt/bot/ip-to-country.csv
COPY ipblacklist.txt /opt/bot/ipblacklist.txt
COPY mapcfgs /opt/bot/mapcfgs
COPY language.cfg /opt/bot/language.cfg
COPY war3 /opt/bot/war3
COPY Maps /opt/bot/Maps
ENV LD_LIBRARY_PATH=/usr/local/lib
RUN apt-get update && apt-get install -y libmariadb3 libboost-all-dev
CMD ["/opt/bot/ghost++"]