Skip to content

Commit

Permalink
Merge pull request #356 from bavix/clear-cache
Browse files Browse the repository at this point in the history
[3.x] chore: clear cache
  • Loading branch information
rez1dent3 authored Jul 18, 2024
2 parents 7fcc25e + 160ab08 commit 9e4bba5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 9e4bba5

Please sign in to comment.