-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
19 additions
and
0 deletions.
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
ARG ALPINE_VERSION | ||
ARG DART_VERSION | ||
ARG GO_VERSION | ||
ARG RUST_VERSION | ||
ARG SWIFT_VERSION | ||
|
@@ -284,6 +285,18 @@ ARG TARGETPLATFORM | |
RUN xx-verify /out/usr/bin/protoc-gen-lint | ||
|
||
|
||
FROM dart:${DART_VERSION} as protoc_gen_dart | ||
RUN apt-get update | ||
RUN apt-get install -y curl | ||
RUN mkdir -p /dart-protobuf | ||
ARG PROTOC_GEN_DART_VERSION | ||
RUN curl -sSL https://api.github.com/repos/google/protobuf.dart/tarball/protoc_plugin-v${PROTOC_GEN_DART_VERSION} | tar xz --strip 1 -C /dart-protobuf | ||
WORKDIR /dart-protobuf/protoc_plugin | ||
RUN pub install | ||
RUN dart compile exe --verbose bin/protoc_plugin.dart -o protoc_plugin | ||
RUN install -D /dart-protobuf/protoc_plugin/protoc_plugin /out/usr/bin/protoc-gen-dart | ||
|
||
|
||
FROM --platform=$BUILDPLATFORM alpine_host as upx | ||
RUN mkdir -p /upx | ||
ARG BUILDARCH BUILDOS UPX_VERSION | ||
|
@@ -320,6 +333,7 @@ RUN find /out -name "*.a" -delete -or -name "*.la" -delete | |
FROM alpine:${ALPINE_VERSION} | ||
LABEL maintainer="Roman Volosatovs <[email protected]>" | ||
COPY --from=upx /out/ / | ||
COPY --from=protoc_gen_dart /out/ / | ||
RUN apk add --no-cache \ | ||
bash\ | ||
grpc \ | ||
|
@@ -343,6 +357,7 @@ COPY protoc-wrapper /usr/bin/protoc-wrapper | |
RUN mkdir -p /test | ||
RUN protoc-wrapper \ | ||
--c_out=/test \ | ||
--dart_out=/test \ | ||
--go_out=/test \ | ||
--gotemplate_out=/test \ | ||
--govalidators_out=/test \ | ||
|
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