From 160ab08149a98852bf3a1ba2805f1ffe9272a5a0 Mon Sep 17 00:00:00 2001 From: Maxim Babichev Date: Thu, 18 Jul 2024 23:50:02 +0300 Subject: [PATCH] chore: clear cache --- Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5b8e50ee..b87549b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,18 +24,21 @@ FROM golang:1.22-alpine3.20 AS builder ARG version -RUN go install -v -ldflags "-s -w" google.golang.org/protobuf/cmd/protoc-gen-go@latest &&\ - go install -v -ldflags "-s -w" google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest +RUN go install -v -ldflags "-s -w" google.golang.org/protobuf/cmd/protoc-gen-go@latest \ + && go install -v -ldflags "-s -w" google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest \ + && rm -rf /root/.cache COPY . /go/src/github.com/bavix/gripmock WORKDIR /go/src/github.com/bavix/gripmock/protoc-gen-gripmock -RUN go install -v -ldflags "-s -w" +RUN go install -v -ldflags "-s -w" \ + && rm -rf /root/.cache WORKDIR /go/src/github.com/bavix/gripmock -RUN go install -v -ldflags "-X 'github.com/bavix/gripmock/cmd.version=${version:-dev}' -s -w" +RUN go install -v -ldflags "-X 'github.com/bavix/gripmock/cmd.version=${version:-dev}' -s -w" \ + && rm -rf /root/.cache FROM golang:1.22-alpine3.20 @@ -56,7 +59,7 @@ COPY . /go/src/github.com/bavix/gripmock WORKDIR /go/src/github.com/bavix/gripmock -RUN go build -o /dev/null . +RUN go build -o /dev/null . && rm -rf /root/.cache EXPOSE 4770 4771