From cba70d5aefa21a17d3555a5bb83b58bcc5673c0e Mon Sep 17 00:00:00 2001 From: headlessdev Date: Sat, 26 Apr 2025 16:13:04 +0200 Subject: [PATCH] Updated Agent Dockerfile --- agent/Dockerfile | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/agent/Dockerfile b/agent/Dockerfile index 00b4f53..706bdd7 100644 --- a/agent/Dockerfile +++ b/agent/Dockerfile @@ -1,25 +1,25 @@ # --- Build Stage --- - FROM golang:1.24-alpine AS builder +FROM golang:1.19-alpine AS builder - WORKDIR /app - - ENV GO111MODULE=on - - COPY go.mod go.sum ./ - RUN go mod download - - COPY . . - - RUN go build -o app . - - # --- Run Stage --- - FROM alpine:latest - - RUN apk --no-cache add ca-certificates - - WORKDIR /root/ - - COPY --from=builder /app/app . - - CMD ["./app"] +WORKDIR /app + +ENV GO111MODULE=on + +COPY go.mod go.sum ./ +RUN go mod download + +COPY . . + +RUN go build -o app ./cmd/agent + +# --- Run Stage --- +FROM alpine:latest + +RUN apk --no-cache add ca-certificates + +WORKDIR /root/ + +COPY --from=builder /app/app . + +CMD ["./app"] \ No newline at end of file