Skip to content

Commit 9d41365

Browse files
committed
add foundationdb deps in dockerfile
1 parent c3c2a9e commit 9d41365

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,34 @@ RUN case "$(uname -m)" in \
7171
mkdir -p /etcd-bin && \
7272
cp etcd-${ETCD_VER}-linux-${arch}/etcdctl /etcd-bin/etcdctl
7373

74+
# Stage 5.5: Download FoundationDB client tools
75+
FROM alpine:latest AS foundationdb-downloader
76+
# https://github.com/apple/foundationdb/releases
77+
ARG FDB_VERSION="7.3.69"
78+
RUN apk add --no-cache curl
79+
RUN mkdir -p /fdb-bin && \
80+
case "$(uname -m)" in \
81+
x86_64) \
82+
cd /fdb-bin && \
83+
curl -fLO "https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/fdbbackup.x86_64" && \
84+
curl -fLO "https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/fdbcli.x86_64" && \
85+
curl -fLO "https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/libfdb_c.x86_64.so" && \
86+
mv fdbbackup.x86_64 fdbbackup && \
87+
mv fdbcli.x86_64 fdbcli && \
88+
mv libfdb_c.x86_64.so libfdb_c.so && \
89+
chmod +x fdbbackup fdbcli ;; \
90+
aarch64) \
91+
cd /fdb-bin && \
92+
curl -fLO "https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/fdbbackup.aarch64" && \
93+
curl -fLO "https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/fdbcli.aarch64" && \
94+
curl -fLO "https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/libfdb_c.aarch64.so" && \
95+
mv fdbbackup.aarch64 fdbbackup && \
96+
mv fdbcli.aarch64 fdbcli && \
97+
mv libfdb_c.aarch64.so libfdb_c.so && \
98+
chmod +x fdbbackup fdbcli ;; \
99+
*) echo 'FoundationDB not available for this architecture, skipping...' ;; \
100+
esac
101+
74102
# Stage 6: Build web assets
75103
FROM node:24-alpine AS web-builder
76104
WORKDIR /build/web
@@ -165,6 +193,10 @@ COPY --from=influx-downloader /influx-bin/influx /usr/local/bin/influx
165193
# Copy etcdctl
166194
COPY --from=etcd-downloader /etcd-bin/etcdctl /usr/local/bin/etcdctl
167195

196+
# Copy FoundationDB client tools (if they exist)
197+
COPY --from=foundationdb-downloader /fdb-bin/* /usr/local/bin/ 2>/dev/null || true
198+
COPY --from=foundationdb-downloader /fdb-bin/libfdb_c.so /usr/lib/ 2>/dev/null || true
199+
168200
# Copy gobackup binary from builder stage
169201
COPY --from=gobackup-builder /build/gobackup /usr/local/bin/gobackup
170202

0 commit comments

Comments
 (0)