aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/dockerfile/grpc_go
diff options
context:
space:
mode:
authorGravatar Tim Emiola <temiola@google.com>2015-01-22 12:16:12 -0800
committerGravatar Tim Emiola <temiola@google.com>2015-01-22 17:10:54 -0800
commitfb6d7fd5720773da1d68f05c2d58cd16bdaf7018 (patch)
tree46e926224777b56b455f564ac629887a860e730f /tools/dockerfile/grpc_go
parent48054c0a19a3cd24a213f7b89ad1c31f3f8c293b (diff)
Adds Dockerfile for Go
Diffstat (limited to 'tools/dockerfile/grpc_go')
-rw-r--r--tools/dockerfile/grpc_go/Dockerfile27
-rw-r--r--tools/dockerfile/grpc_go/README.md4
2 files changed, 31 insertions, 0 deletions
diff --git a/tools/dockerfile/grpc_go/Dockerfile b/tools/dockerfile/grpc_go/Dockerfile
new file mode 100644
index 0000000000..ab463b2a00
--- /dev/null
+++ b/tools/dockerfile/grpc_go/Dockerfile
@@ -0,0 +1,27 @@
+# Dockerfile for gRPC Go
+FROM golang:1.4
+
+# Install SSH to that Go source can be pulled securely.
+RUN apt-get update && apt-get install -y ssh
+
+# Install a GitHub SSH service credential that gives access to the GitHub repo while it's private
+#
+# TODO: remove this once the repo is public
+ADD .ssh .ssh
+RUN chmod 600 /.ssh/github.rsa
+RUN mkdir -p $HOME/.ssh && echo 'Host github.com' > $HOME/.ssh/config
+RUN echo " IdentityFile /.ssh/github.rsa" >> $HOME/.ssh/config
+RUN echo 'StrictHostKeyChecking no' >> $HOME/.ssh/config
+
+# Force go get to use the GitHub ssh url instead of https, and use the SSH creds
+RUN git config --global url."git@github.com:".insteadOf "https://github.com/"
+
+# Get the source from GitHub
+RUN go get github.com/google/grpc-go
+
+# Build the interop client and server
+RUN cd src/github.com/google/grpc-go/interop/client && go install
+RUN cd src/github.com/google/grpc-go/interop/server && go install
+
+# Specify the default command such that the interop server runs on its known testing port
+CMD ["/bin/bash", "-c 'cd src/github.com/google/grpc-go/interop/server && go run server.go --use_tls=true --port=8020'"]
diff --git a/tools/dockerfile/grpc_go/README.md b/tools/dockerfile/grpc_go/README.md
new file mode 100644
index 0000000000..0d6ad3e391
--- /dev/null
+++ b/tools/dockerfile/grpc_go/README.md
@@ -0,0 +1,4 @@
+GRPC Go Dockerfile
+==================
+
+Dockerfile for gRPC Go development, testing and deployment.