feat(blindbit): upgrade Go builder to 1.25
Some checks failed
CI - 4NK_node / Code Quality (push) Failing after 31s
CI - 4NK_node / Unit Tests (push) Failing after 29s
CI - 4NK_node / Integration Tests (push) Failing after 54s
CI - 4NK_node / Security Tests (push) Failing after 28s
CI - 4NK_node / Docker Build & Test (push) Failing after 11s
CI - 4NK_node / Documentation Tests (push) Failing after 3s
CI - 4NK_node / Security Audit (push) Successful in 3s
CI - 4NK_node / Release Guard (push) Has been skipped
CI - 4NK_node / Performance Tests (push) Successful in 27s
CI - 4NK_node / Notify (push) Failing after 3s
CI - 4NK_node / Publish Release (push) Has been skipped

This commit is contained in:
Debian 2025-09-04 13:36:34 +00:00
parent 8f4638b70c
commit 289918a7e9

View File

@ -1,15 +1,31 @@
FROM rust:1.75-alpine AS builder # blindbit-oracle/Dockerfile
WORKDIR /app FROM golang:1.25 as builder
RUN apk add --no-cache musl-dev openssl-dev pkgconfig
COPY Cargo.toml ./
COPY src ./src
RUN cargo build --release
FROM alpine:3.19 AS runtime WORKDIR /app
WORKDIR /home/bitcoin
RUN adduser -D blindbit && \ # Cloner le repo blindbit-oracle
mkdir -p /home/bitcoin/.bitcoin && chown -R blindbit:blindbit /home/bitcoin RUN git clone --branch dev --depth 1 https://github.com/setavenger/blindbit-oracle.git .
COPY --from=builder /app/target/release/blindbit /usr/local/bin/blindbit
# Compiler le binaire
RUN go build -o /go/bin/blindbit-oracle ./src
# Utiliser debian:bookworm-slim qui contient GLIBC 2.34
FROM debian:bookworm-slim
# Installation des dépendances nécessaires
RUN apt-get update && apt-get install -y ca-certificates curl && rm -rf /var/lib/apt/lists/*
# Copier le binaire depuis le builder
COPY --from=builder /go/bin/blindbit-oracle /usr/local/bin/blindbit-oracle
# Créer le répertoire de données
RUN mkdir -p /data
# Créer le volume pour les données
VOLUME ["/data"]
# Exposer le port par défaut
EXPOSE 8000 EXPOSE 8000
USER blindbit
CMD ["/usr/local/bin/blindbit", "--config", "/home/bitcoin/blindbit.toml"] # Démarrer blindbit-oracle avec le répertoire de données spécifié
ENTRYPOINT ["blindbit-oracle", "-datadir", "/data"]