From 5630e8a4c20ca49cdfa7882828045cbdd49a083c Mon Sep 17 00:00:00 2001 From: Ved Ratan Date: Mon, 26 Feb 2024 12:42:44 +0530 Subject: [PATCH] fixed dockerfile issue Signed-off-by: Ved Ratan --- sentryflow/Dockerfile => Dockerfile | 2 +- .../log-client/Dockerfile => Dockerfile.log-client | 12 +++++++----- .../Dockerfile => Dockerfile.mongo-client | 10 ++++++---- 3 files changed, 14 insertions(+), 10 deletions(-) rename sentryflow/Dockerfile => Dockerfile (94%) rename sentryflow-clients/log-client/Dockerfile => Dockerfile.log-client (88%) rename sentryflow-clients/mongo-client/Dockerfile => Dockerfile.mongo-client (90%) diff --git a/sentryflow/Dockerfile b/Dockerfile similarity index 94% rename from sentryflow/Dockerfile rename to Dockerfile index d6305aa..a509f41 100644 --- a/sentryflow/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ### Builder -FROM golang:1.19-alpine3.17 as builder +FROM golang:1.22.0-alpine3.19 as builder RUN apk --no-cache update RUN apk add --no-cache git clang llvm make gcc protobuf make diff --git a/sentryflow-clients/log-client/Dockerfile b/Dockerfile.log-client similarity index 88% rename from sentryflow-clients/log-client/Dockerfile rename to Dockerfile.log-client index e0f7f5b..f0ff44f 100644 --- a/sentryflow-clients/log-client/Dockerfile +++ b/Dockerfile.log-client @@ -2,24 +2,26 @@ ### Builder -FROM golang:1.19-alpine3.17 as builder +FROM golang:1.22.0-alpine3.19 as builder RUN apk --no-cache update RUN apk add --no-cache git clang llvm make gcc protobuf +RUN go install github.com/golang/protobuf/protoc-gen-go@latest +RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest RUN mkdir /app RUN mkdir /protobuf WORKDIR /protobuf - COPY /protobuf . +RUN go mod tidy +RUN make build -WORKDIR /app +WORKDIR /app COPY /sentryflow-clients/log-client . -RUN go install github.com/golang/protobuf/protoc-gen-go@latest -RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest +RUN go mod tidy RUN go build -o log-client ### Make executable image diff --git a/sentryflow-clients/mongo-client/Dockerfile b/Dockerfile.mongo-client similarity index 90% rename from sentryflow-clients/mongo-client/Dockerfile rename to Dockerfile.mongo-client index 1a0d3ca..4d744f8 100644 --- a/sentryflow-clients/mongo-client/Dockerfile +++ b/Dockerfile.mongo-client @@ -2,24 +2,26 @@ ### Builder -FROM golang:1.19-alpine3.17 as builder +FROM golang:1.22.0-alpine3.19 as builder RUN apk --no-cache update RUN apk add --no-cache git clang llvm make gcc protobuf +RUN go install github.com/golang/protobuf/protoc-gen-go@latest +RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest RUN mkdir /app RUN mkdir /protobuf WORKDIR /protobuf - COPY /protobuf . +RUN go mod tidy +RUN make build WORKDIR /app COPY /sentryflow-clients/mongo-client . -RUN go install github.com/golang/protobuf/protoc-gen-go@latest -RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + RUN go build -o mongo-client ### Make executable image