-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
71 lines (57 loc) · 2.5 KB
/
Dockerfile
File metadata and controls
71 lines (57 loc) · 2.5 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
# ==============================================================================
# BUILD STAGE
# ==============================================================================
FROM --platform=$BUILDPLATFORM golang:1.25.4-alpine3.22 AS builder
ARG TARGETOS
ARG TARGETARCH
ARG VERSION=dev
ARG REVISION=unknown
# Alpine package pins are exact (including -rN revision). Rotation to a new
# revision will break this build; bump manually on Alpine package updates.
# Automated bumps deferred to v0.5.x (Renovate config).
RUN apk add --no-cache \
ca-certificates=20260413-r0 \
tzdata=2026a-r0
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build \
-ldflags="-s -w -X main.Version=${VERSION} -X main.Revision=${REVISION}" \
-trimpath \
-o pebblify \
./cmd/pebblify
# ==============================================================================
# PRODUCTION STAGE
# ==============================================================================
FROM alpine:3.22
ARG VERSION=dev
ARG REVISION=unknown
ARG CREATED=unknown
LABEL org.opencontainers.image.title="Pebblify" \
org.opencontainers.image.description="LevelDB to PebbleDB migration tool and long-running daemon for Cosmos/CometBFT nodes (CLI + daemon modes)." \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.revision="${REVISION}" \
org.opencontainers.image.url="https://www.dockermint.io" \
org.opencontainers.image.documentation="https://docs.dockermint.io/pebblify/" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.vendor="Dockermint" \
org.opencontainers.image.authors="Dockermint" \
org.opencontainers.image.created="${CREATED}" \
org.opencontainers.image.base.name="alpine:3.22"
# Alpine package pins are exact (including -rN revision). Rotation to a new
# revision will break this build; bump manually on Alpine package updates.
# Automated bumps deferred to v0.5.x (Renovate config).
RUN apk add --no-cache \
ca-certificates=20260413-r0 \
tzdata=2026a-r0 \
wget=1.25.0-r1 \
&& addgroup -g 10000 pebblify \
&& adduser -D -H -u 10000 -G pebblify -s /sbin/nologin pebblify
COPY --from=builder /build/pebblify /usr/local/bin/pebblify
# CLI legacy health port + metrics port
EXPOSE 8086 9090
# Daemon: Prometheus/telemetry (2323), REST API (2324), Health (2325)
EXPOSE 2323 2324 2325
USER 10000:10000
ENTRYPOINT ["pebblify"]