-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
97 lines (83 loc) · 2.28 KB
/
Dockerfile
File metadata and controls
97 lines (83 loc) · 2.28 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
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
ARG AG="apt-get -yq --no-install-recommends"
ARG DEBIAN_FRONTEND="noninteractive"
FROM debian:unstable AS builder
ARG AG
ARG DEBIAN_FRONTEND
RUN set -eux; \
$AG update; \
$AG install \
binutils-dev \
ca-certificates \
cmake \
g++ \
git \
libboost-all-dev \
libdouble-conversion-dev \
libevent-dev \
libfast-float-dev \
libfmt-dev \
libgflags-dev \
libgoogle-glog-dev \
libgtest-dev \
libiberty-dev \
libjemalloc-dev \
liblz4-dev \
liblzma-dev \
libsnappy-dev \
libssl-dev \
make \
patch \
pkg-config \
python3.12 \
wget \
zlib1g-dev \
;
# v2025.10.27.00 is the last release with "folly/detail/SplitStringSimd.cpp"
# which is used in wdt's CMakeLists.txt as of 26-Jan-2026
ADD https://github.com/facebook/folly.git#v2025.10.27.00 /build/folly
# yolo; but for reference, known good semver as of 26-Jan-2026 is "v1.27.1612021"
ADD https://github.com/facebook/wdt.git /build/wdt
COPY patches /build/patches/
# we don't need to actually build folly, we just need the source tree to be there (for emotional support)
# WORKDIR /build/folly
# RUN set -eux; \
# mkdir -p ~/.config/pip; \
# printf '%s\n' "[global]" "break-system-packages = true" >~/.config/pip/pip.conf; \
# python3 ./build/fbcode_builder/getdeps.py install-system-deps --allow-system-packages --recursive folly; \
# python3 ./build/fbcode_builder/getdeps.py --allow-system-packages build folly;
WORKDIR /build/wdt/_build
RUN set -eux; \
(cd ..; for patch in /build/patches/*; do patch -i "$patch"; done); \
cmake .. -DBUILD_TESTING=off; \
make -j$(nproc); \
make install;
FROM debian:unstable-slim
ARG AG
ARG DEBIAN_FRONTEND
RUN set -eux; \
$AG update; \
$AG upgrade; \
$AG install \
ca-certificates \
'libgoogle-glog?v*' \
tini \
; \
$AG autoremove; \
$AG clean; \
rm -rf \
/var/cache/debconf/*-old \
/var/lib/apt/lists/* \
/var/lib/dpkg/*-old \
;
COPY --from=builder \
/usr/local/lib/libfolly4wdt.so \
/usr/local/lib/libwdt_min.so \
/usr/local/lib/libwdt_min.so.* \
/usr/local/lib/libwdt.so \
/usr/local/lib/libwdt.so.* \
/usr/local/lib/
COPY --from=builder \
/usr/local/bin/wcp \
/usr/local/bin/wdt \
/usr/local/bin/
ENTRYPOINT [ "/usr/bin/tini", "--", "/usr/local/bin/wdt" ]