Files
next.orly.dev/cmd/benchmark/Dockerfile.strfry
2025-09-12 21:30:27 +01:00

45 lines
966 B
Docker

FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update && apt-get install -y \
git \
build-essential \
liblmdb-dev \
libsecp256k1-dev \
pkg-config \
libtool \
autoconf \
automake \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
# Fetch strfry source with submodules to ensure golpe is present
RUN git clone --recurse-submodules https://github.com/hoytech/strfry .
# Build strfry
RUN make setup-golpe && \
make -j$(nproc)
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y \
liblmdb0 \
libsecp256k1-0 \
curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /build/strfry /app/
RUN mkdir -p /data
EXPOSE 8080
ENV STRFRY_DB_PATH=/data/strfry.lmdb
ENV STRFRY_RELAY_PORT=8080
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8080 || exit 1
CMD ["/app/strfry", "relay"]