-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile.runtime
More file actions
47 lines (37 loc) · 1.55 KB
/
Copy pathDockerfile.runtime
File metadata and controls
47 lines (37 loc) · 1.55 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
# Stage 3: Minimal runtime image
# Production-ready image with binaries only
ARG BUILDER_IMAGE=qlean-mini-builder:latest
ARG BASE_IMAGE=ubuntu:24.04
FROM ${BUILDER_IMAGE} AS builder
FROM ${BASE_IMAGE} AS runtime
ARG BASE_IMAGE
ARG GIT_COMMIT=unknown
ARG GIT_BRANCH=unknown
ARG BUILD_DATE=unknown
ARG VERSION=unknown
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libstdc++6 \
ca-certificates && \
rm -rf /var/lib/apt/lists/*
WORKDIR /work
# Copy artifacts from builder (binaries are already stripped)
COPY --from=builder /opt/artifacts/out/bin/qlean /opt/qlean/bin/qlean
# Verify runtime image
RUN echo "=== Runtime image contents ===" && \
echo "Binary:" && ls -lh /opt/qlean/bin/qlean
# OCI Image Spec annotations
# https://github.com/opencontainers/image-spec/blob/main/annotations.md
LABEL org.opencontainers.image.title="qlean-mini"
LABEL org.opencontainers.image.description="Qlean-mini: lean Ethereum consensus client for devnets — minimal optimized runtime"
LABEL org.opencontainers.image.source="https://github.com/qdrvm/qlean-mini"
LABEL org.opencontainers.image.documentation="https://github.com/qdrvm/qlean-mini#readme"
LABEL org.opencontainers.image.vendor="QDRVM"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.version=$VERSION
LABEL org.opencontainers.image.created=$BUILD_DATE
LABEL org.opencontainers.image.revision=$GIT_COMMIT
LABEL org.opencontainers.image.ref.name=$GIT_BRANCH
LABEL org.opencontainers.image.base.name=$BASE_IMAGE
ENTRYPOINT ["/opt/qlean/bin/qlean"]
CMD ["--help"]