-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.api
More file actions
70 lines (55 loc) · 1.31 KB
/
Copy pathDockerfile.api
File metadata and controls
70 lines (55 loc) · 1.31 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
FROM ubuntu:24.04 AS build
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
cmake \
ninja-build \
libboost-all-dev \
libssl-dev \
libsqlite3-dev \
zlib1g-dev \
ca-certificates && \
rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY CMakeLists.txt .
COPY include ./include
COPY src ./src
COPY apps ./apps
COPY tests ./tests
COPY benchmarks ./benchmarks
RUN cmake \
-S . \
-B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release && \
cmake --build build \
--target minimatch_api \
-j 2
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libboost-system1.83.0 \
libsqlite3-0 \
libssl3 \
zlib1g \
ca-certificates && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=build \
/src/build/minimatch_api \
/app/minimatch_api
RUN mkdir -p \
/app/data/oms \
/app/data/algo \
/app/data/drop_copy \
/app/data/settings \
/app/data/market \
/app/data/executions \
/app/data/fix
ENV PORT=10000
ENV EXECUTION_DB_PATH=/app/data/executions/minimatch_executions.sqlite
ENV FIX_DB_PATH=/app/data/fix/minimatch_fix.sqlite
EXPOSE 10000
CMD ["/app/minimatch_api"]