Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Experiment] GripMock standalone #4

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading