Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM golang:1.23.8-bullseye AS builder
FROM golang:1.23.10-bullseye AS builder

RUN apt-get update \
&& apt-get install -y --no-install-recommends libsystemd-dev \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /tmp/src
COPY go.mod .
COPY go.sum .
Expand All @@ -11,13 +12,10 @@ COPY . .
ARG VERSION=unknown
RUN CGO_ENABLED=1 go build -mod=readonly -ldflags "-extldflags='-Wl,-z,lazy' -X 'github.com/coroot/coroot-node-agent/flags.Version=${VERSION}'" -o coroot-node-agent .

RUN apt-get purge -y python3 python3-pip python3-setuptools python3-urllib3 \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

FROM registry.access.redhat.com/ubi9/ubi
FROM registry.access.redhat.com/ubi9/ubi-minimal AS runtime

ARG VERSION=unknown

COPY --from=builder /tmp/src/coroot-node-agent /usr/bin/coroot-node-agent

ENTRYPOINT ["coroot-node-agent"]