aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/dockerfile/grpc_dist_proto/Dockerfile
diff options
context:
space:
mode:
authorGravatar Tim Emiola <temiola@google.com>2015-03-18 11:44:38 -0700
committerGravatar Tim Emiola <temiola@google.com>2015-03-18 14:52:31 -0700
commit0d949f5decbf2d98d5a9c9731292379d996566ef (patch)
treecac95d88ab4025457c3d2ec4fdfc53515b3ef759 /tools/dockerfile/grpc_dist_proto/Dockerfile
parent64af6830f38b120139deba09215b2dc8786357a3 (diff)
Updates the structure and name of the tar.gz archive
- the name includes a version - the top-level directory of the tar has the same name as the archive
Diffstat (limited to 'tools/dockerfile/grpc_dist_proto/Dockerfile')
-rw-r--r--tools/dockerfile/grpc_dist_proto/Dockerfile17
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/dockerfile/grpc_dist_proto/Dockerfile b/tools/dockerfile/grpc_dist_proto/Dockerfile
index a15b7ca4a6..b4ed3b6035 100644
--- a/tools/dockerfile/grpc_dist_proto/Dockerfile
+++ b/tools/dockerfile/grpc_dist_proto/Dockerfile
@@ -30,6 +30,9 @@
# Dockerfile to build protoc and plugins for inclusion in a release.
FROM grpc/base
+# Add the file containing the gRPC version
+ADD version.txt version.txt
+
# Install tools needed for building protoc.
RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev
@@ -56,16 +59,16 @@ WORKDIR /var/local/git/grpc
RUN LDFLAGS=-static make plugins
# Create an archive containing all the generated binaries.
-RUN mkdir /tmp/proto_bins_root
-RUN cp -v bins/opt/* /tmp/proto_bins_root
-RUN cp -v /tmp/protoc_static/bin/protoc /tmp/proto_bins_root
-RUN cd /tmp/proto_bins_root && \
- tar -czf /tmp/proto-bins-linux-$(uname -m).tar.gz *
+RUN mkdir /tmp/proto-bins_$(cat /version.txt)_linux-$(uname -m)
+RUN cp -v bins/opt/* /tmp/proto-bins_$(cat /version.txt)_linux-$(uname -m)
+RUN cp -v /tmp/protoc_static/bin/protoc /tmp/proto-bins_$(cat /version.txt)_linux-$(uname -m)
+RUN cd /tmp && \
+ tar -czf proto-bins_$(cat /version.txt)_linux-$(uname -m).tar.gz proto-bins_$(cat /version.txt)_linux-$(uname -m)
# List the tar contents: provides a way to visually confirm that the contents
# are correct.
-RUN echo 'proto-bins-linux-tar-$(uname -m) contents:' && \
- tar -ztf /tmp/proto-bins-linux-$(uname -m).tar.gz
+RUN echo 'proto-bins_$(cat /version.txt)_linux-tar-$(uname -m) contents:' && \
+ tar -ztf /tmp/proto-bins_$(cat /version.txt)_linux-$(uname -m).tar.gz