-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Containerize plugin for remote code generation via buf.build (#5)
- Loading branch information
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM golang:1.18-alpine as go-builder | ||
|
||
ENV GOOS=linux GOARCH=amd64 CGO_ENABLED=0 | ||
|
||
ARG VERSION="latest" | ||
|
||
WORKDIR /app | ||
|
||
COPY go.mod ./ | ||
COPY go.sum ./ | ||
RUN go mod download | ||
|
||
COPY . . | ||
|
||
RUN cd protoc-gen-graphql ; go build -ldflags "-X main.version=${VERSION}" | ||
|
||
FROM scratch | ||
|
||
ARG VERSION="latest" | ||
|
||
# Runtime dependencies | ||
LABEL "build.buf.plugins.runtime_library_versions.0.name"="google.golang.org/protobuf" | ||
LABEL "build.buf.plugins.runtime_library_versions.0.version"="v1.28.0" | ||
LABEL "build.buf.plugins.runtime_library_versions.1.name"="github.com/alehechka/grpc-graphql-gateway" | ||
LABEL "build.buf.plugins.runtime_library_versions.1.version"="${VERSION}" | ||
|
||
COPY --from=go-builder /app/protoc-gen-graphql/protoc-gen-graphql / | ||
|
||
ENTRYPOINT [ "/protoc-gen-graphql" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters