rvolosatovs / docker-protobuf

An all-inclusive protoc Docker image

Home Page:https://hub.docker.com/r/rvolosatovs/protoc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JS support on `arm64`

strophy opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Description

#128 bumped the protoc version from 3.18 to 3.21.

The JavaScript plugin was moved out to a separate repository in protobuf 3.21 (announcement), so a new protoc-gen-js plugin is now needed to generate JS code. Since this does not yet exist in Alpine (tracking issue here), and the plugin is not yet available in npm like it is for TypeScript, and the released plugin binaries depend on GNU libc instead of musl libc, we need to build the plugin ourself using Bazel.

Bazel 5.2.0+ is required to build, but we cannot build it under Alpine due to this bug. I plan to resolve this with Alpine directly, since we really shouldn't be building Bazel itself if not necessary. Alternatively, we could install libstd++ in the target container, but let's see if any of the other blockers get resolved first.

Acceptance Criteria

Working protoc_gen_js build under Alpine.

Suggestions for a technical implementation

See above