From 0cadc199e59e406eadc957513fe3abe6b03f4028 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Mon, 27 May 2024 20:09:45 +0300 Subject: [PATCH] create base and configurable image for nucleus Signed-off-by: onur-ozkan --- Dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5b3ad4f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# Compilation +FROM docker.io/library/golang:1.21-alpine AS nucleus-builder +WORKDIR /src/src/nucleus +COPY go.mod go.sum* ./ +RUN go mod download +COPY . . +ENV PACKAGES curl make git libc-dev bash gcc linux-headers eudev-dev python3 +RUN apk add --no-cache $PACKAGES +RUN CGO_ENABLED=0 make install + +# Runtime +FROM docker.io/chainguard/static:latest +COPY --from=nucleus-builder /go/bin/nucleusd /usr/local/bin/ +USER 0 + +ENTRYPOINT ["nucleusd", "start"]