-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
115 lines (99 loc) · 3.25 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS data-build
WORKDIR /
COPY resources/table /app/resources/table
COPY tools/data-converter /app/tools/data-converter
WORKDIR /app/tools/data-converter
RUN dotnet publish -c Release /p:DefineConstants=DISABLED_TTY -o bin
WORKDIR /app/tools/data-converter/bin
RUN ./ExcelTableConverter --dir=/app/resources/table --lang="c++|c#"
RUN mv output /output
FROM --platform=$BUILDPLATFORM ubuntu:24.04
RUN apt-get update -y
RUN apt-get upgrade -y
RUN apt-get install git gcc-14 g++-14 gdb make cmake libssl-dev libstdc++-14-dev wget -y
RUN ln -s -f /usr/bin/gcc-14 /usr/bin/gcc && ln -s -f /usr/bin/g++-14 /usr/bin/g++
RUN apt-get install libncurses5-dev libncursesw5-dev -y
WORKDIR /app
RUN git clone https://github.com/open-source-parsers/jsoncpp
WORKDIR /app/jsoncpp
RUN git checkout 1.9.6
WORKDIR /app/jsoncpp/build
RUN cmake ..
RUN cmake --build . --config Release --parallel
RUN make install
WORKDIR /app
RUN git clone https://github.com/alanxz/rabbitmq-c
WORKDIR /app/rabbitmq-c
RUN git checkout v0.14.0
WORKDIR /app/rabbitmq-c/build
RUN cmake .. -DENABLE_SSL_SUPPORT=OFF
RUN cmake --build . --config Release --parallel
RUN make install
WORKDIR /app
RUN git clone --recursive https://github.com/boyism80/lua
WORKDIR /app/lua/build
RUN cmake ..
RUN cmake --build . --config Release --parallel
RUN make install
WORKDIR /app
RUN git clone https://github.com/intel/zlib
WORKDIR /app/zlib
RUN git checkout v1.2.9
WORKDIR /app/zlib/build
RUN cmake ..
RUN cmake --build . --config Release --parallel
RUN make install
WORKDIR /app
RUN git clone https://github.com/boyism80/flatbuffers
WORKDIR /app/flatbuffers/build
RUN cmake .. -DFLATBUFFERS_BUILD_FLATC=OFF -DFLATBUFFERS_BUILD_TESTS=OFF
RUN cmake --build . --config Release --parallel
RUN make install
WORKDIR /app
RUN git clone https://github.com/yhirose/cpp-httplib
WORKDIR /app/cpp-httplib
RUN git checkout v0.18.1
WORKDIR /app/cpp-httplib/build
RUN cmake ..
RUN cmake --build . --config Release --parallel
RUN make install
WORKDIR /app
RUN git clone https://github.com/microsoft/cpp-async
WORKDIR /app/cpp-async
RUN git checkout v1.1.0
RUN cp -r /app/cpp-async/include/async /usr/local/include/async
WORKDIR /app
RUN git clone https://github.com/boostorg/boost
WORKDIR /app/boost
RUN git checkout boost-1.84.0
RUN git submodule update --init --recursive
RUN ./bootstrap.sh
RUN ./b2
RUN ./b2 install
WORKDIR /app
RUN git clone --recursive https://github.com/cpp-redis/cpp_redis.git
WORKDIR /app/cpp_redis/tacopie
RUN git fetch origin pull/5/head:cmake-fixes && git checkout cmake-fixes
RUN sed -i 's/add_library(${PROJECT_NAME} SHARED #${tacopie_sources})/add_library(${PROJECT_NAME} ${tacopie_sources})/' CMakeLists.txt
WORKDIR ../
RUN sed -i 's/add_library(${PROJECT_NAME} SHARED #${cpp_redis_sources})/add_library(${PROJECT_NAME} ${cpp_redis_sources})/' CMakeLists.txt
RUN mkdir build
WORKDIR ./build
RUN cmake .. -DCMAKE_BUILD_TYPE=Release
RUN cmake --build . --config Release --parallel
RUN make install
# fb.lib
WORKDIR /app
COPY include ./include
COPY lib ./lib
WORKDIR /app/lib/build
RUN cmake ..
RUN cmake --build . --config Release --parallel
RUN make install
RUN rm -rf /app
WORKDIR /fb/data
COPY --from=data-build /output .
WORKDIR /
RUN ldconfig
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8