File: Dockerfile.jsonschema

package info (click to toggle)
golang-github-sigstore-protobuf-specs 0.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid
  • size: 2,104 kB
  • sloc: makefile: 126; sh: 124; ruby: 7
file content (15 lines) | stat: -rw-r--r-- 951 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
FROM golang:1.24.4-alpine@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a AS jsonschema-builder

ADD hack/jsonschema/go.* hack/jsonschema/tools.go tools/

# the specific versions of these tools are in hack/go.mod so that Dependabot can bump them for updates
RUN cd tools && go build --trimpath -o /usr/local/bin/protoc-gen-jsonschema github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema

FROM gcr.io/distroless/static-debian12:nonroot@sha256:627d6c5a23ad24e6bdff827f16c7b60e0289029b0c79e9f7ccd54ae3279fb45f

COPY --from=jsonschema-builder /usr/local/bin/protoc-gen-jsonschema /usr/local/bin/
COPY --from=protoc-base:jsonschema /protobuf/bin/protoc /usr/local/bin/
COPY --from=protoc-base:jsonschema /protobuf/include/google /opt/include/google
COPY --from=protoc-base:jsonschema /googleapis /googleapis

ENTRYPOINT ["/usr/local/bin/protoc", "--plugin=protoc-gen-jsonschema=/usr/local/bin/protoc-gen-jsonschema" ]