Skip to content

Commit

Permalink
Gripmock standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 committed Aug 19, 2023
1 parent 85c8f34 commit 2b87d8a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 22 deletions.
16 changes: 14 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM golang:1.21.0-alpine3.17
ARG BUILD_ARG_GO_VERSION=1.21.0
ARG BUILD_ARG_ALPINE_VERSION=3.18
FROM golang:${BUILD_ARG_GO_VERSION}-alpine${BUILD_ARG_ALPINE_VERSION} AS builder

# install tools (bash, git, protobuf, protoc-gen-go, protoc-grn-go-grpc, pkger)
RUN apk -U --no-cache add bash git protobuf &&\
Expand Down Expand Up @@ -28,6 +30,16 @@ WORKDIR /go/src/github.com/tokopedia/gripmock
# install gripmock & build example to cache necessary imports
RUN go install -v && go build ./example/simple/client

RUN cp $GOPATH/bin/gripmock /usr/local/bin/

FROM alpine:${BUILD_ARG_ALPINE_VERSION}

WORKDIR /

RUN apk add --update protoc

COPY --from=builder /usr/local/bin/gripmock .

EXPOSE 4770 4771

ENTRYPOINT ["gripmock"]
ENTRYPOINT ["/gripmock"]
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build:
docker buildx build --load -t "rez1dent3/gripmock:latest" --no-cache --platform linux/arm64 .
10 changes: 0 additions & 10 deletions build.sh

This file was deleted.

10 changes: 0 additions & 10 deletions push.sh

This file was deleted.

0 comments on commit 2b87d8a

Please sign in to comment.