This repository has been archived by the owner on Mar 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
node: compile protos into JSON #678
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -34,10 +34,6 @@ RUN apt-get update \ | |
python3-pip \ | ||
# Java | ||
openjdk-8-jdk-headless \ | ||
# NodeJS | ||
# This installs Node 4 on Ubuntu 16.04. | ||
nodejs \ | ||
npm \ | ||
# Ruby | ||
ruby \ | ||
ruby-dev \ | ||
|
@@ -62,8 +58,21 @@ RUN apt-get update \ | |
libunwind8 \ | ||
libuuid1 \ | ||
zlib1g \ | ||
xz-utils \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Download and unpack Node.js v10 | ||
RUN mkdir -p /opt \ | ||
&& curl -L https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-x64.tar.xz -o /opt/node-v10.16.0-linux-x64.tar.xz \ | ||
&& tar -C /opt -xJf /opt/node-v10.16.0-linux-x64.tar.xz \ | ||
&& rm -f /opt/node-v10.16.0-linux-x64.tar.xz | ||
ENV PATH /opt/node-v10.16.0-linux-x64/bin:$PATH | ||
|
||
# Install google-gax for Node.js | ||
RUN npm install -g google-gax@^1.2.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh bother. What's going to keep that version up to date? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well... semver |
||
# Run the compileProtos script for the first time to download runtime dependencies; ignore exit code | ||
RUN compileProtos || true | ||
|
||
# Install all required protoc versions, and install protobuf Python package. | ||
ADD install_protoc.sh / | ||
RUN bash install_protoc.sh | ||
|
@@ -78,10 +87,6 @@ RUN curl -L https://www.nuget.org/api/v2/package/Grpc.Tools/1.17.1 -o temp.zip \ | |
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/ | ||
RUN export JAVA_HOME | ||
|
||
# Ubuntu apt uses "nodejs" as the executable, but everything else expects | ||
# the executable to be spelled "node". | ||
RUN ln -s /usr/bin/nodejs /usr/local/bin/node | ||
|
||
# Install Go. | ||
RUN mkdir -p /golang \ | ||
&& cd /golang \ | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Little worried about how we keep the version of nodejs you're running here up to date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, first of all, it does not make it any worse because previously it was Node 4 from Ubuntu :) Then, this version of Node.js is only used for compiling protos. I suggest we leave both versions (Node.js and google-gax) hardcoded here for now (same way as we do for other stuff in this
Dockerfile
such asprotoc
version, etc.) and update as needed.Actually, we'll get rid of artman soon (I hope so) so who cares?