mirror of https://github.com/grpc/grpc.git
parent
c5e9018de9
commit
c3c3a8f051
4 changed files with 50 additions and 7 deletions
@ -0,0 +1,14 @@ |
||||
# Dockerfile for gRPC Node |
||||
FROM grpc/node_base |
||||
|
||||
# Update the C libary |
||||
RUN cd /var/local/git/grpc \ |
||||
&& git pull --recurse-submodules \ |
||||
&& git submodule update --init --recursive |
||||
|
||||
# Install the C core. |
||||
RUN make install_c -C /var/local/git/grpc |
||||
|
||||
RUN cd /var/local/git/grpc/src/node && npm install && node-gyp rebuild |
||||
|
||||
CMD ["/usr/bin/nodejs", "/var/local/git/grpc/src/node/interop/interop_server.js", "--use_tls=true", "--port 8040"] |
@ -0,0 +1,22 @@ |
||||
# Base Dockerfile for gRPC Node. |
||||
# |
||||
# Includes Node installation dependencies |
||||
FROM grpc/base |
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup | bash - |
||||
|
||||
RUN apt-get update && apt-get install -y nodejs |
||||
|
||||
RUN npm install -g node-gyp |
||||
|
||||
# Get the source from GitHub, this gets the protobuf library as well |
||||
RUN git clone git@github.com:google/grpc.git /var/local/git/grpc |
||||
RUN cd /var/local/git/grpc && \ |
||||
git pull --recurse-submodules && \ |
||||
git submodule update --init --recursive |
||||
|
||||
# Build the C core |
||||
RUN make static_c shared_c -j12 -C /var/local/git/grpc |
||||
|
||||
# Define the default command. |
||||
CMD ["bash"] |
Loading…
Reference in new issue