-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (21 loc) · 1019 Bytes
/
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
FROM ubuntu:24.04@sha256:80dd3c3b9c6cecb9f1667e9290b3bc61b78c2678c02cbdae5f0fea92cc6734ab AS build
ENV DEBIAN_FRONTEND=noninteractive
# Do not install libev-dev because we need libev to be built with -fPIC.
RUN \
apt-get update && \
apt-get install -y --no-install-recommends ca-certificates cmake file git clang make nlohmann-json3-dev pkgconf patch unixodbc-dev && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
COPY . /app
WORKDIR /app
RUN \
cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_MOSTLY_STATIC_BINARY=on && \
cmake --build build && \
strip --strip-unneeded build/src/tfhttp
FROM ubuntu:24.04@sha256:80dd3c3b9c6cecb9f1667e9290b3bc61b78c2678c02cbdae5f0fea92cc6734ab
ENV DEBIAN_FRONTEND=noninteractive
RUN \
apt-get update && \
apt-get install -y --no-install-recommends libsqliteodbc odbc-mariadb libodbc2 && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
COPY --from=build /app/build/src/tfhttp /usr/bin/tfhttp
ENTRYPOINT ["/usr/bin/tfhttp"]