aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/tools/dockerfile/php_common_deps.include
diff options
context:
space:
mode:
authorGravatar Stanley Cheung <stanleycheung@google.com>2016-07-23 19:07:36 -0700
committerGravatar Stanley Cheung <stanleycheung@google.com>2016-07-23 19:07:36 -0700
commit2e2cdffe9dba109c7602ec33b99b123eceb071e2 (patch)
tree9559897f5113b25727e4af02f9fd0513c361a8cc /templates/tools/dockerfile/php_common_deps.include
parent47168ea6ee63a88429256f78cde24da420c24f13 (diff)
php: add php7 to jenkins basic and interop tests
Diffstat (limited to 'templates/tools/dockerfile/php_common_deps.include')
-rw-r--r--templates/tools/dockerfile/php_common_deps.include21
1 files changed, 21 insertions, 0 deletions
diff --git a/templates/tools/dockerfile/php_common_deps.include b/templates/tools/dockerfile/php_common_deps.include
new file mode 100644
index 0000000000..8839bb5155
--- /dev/null
+++ b/templates/tools/dockerfile/php_common_deps.include
@@ -0,0 +1,21 @@
+# ronn: a ruby tool used to convert markdown to man pages, used during the
+# install of Protobuf extensions
+#
+# rake: a ruby version of make used to build the PHP Protobuf extension
+RUN /bin/bash -l -c "rvm all do gem install ronn rake"
+
+# Install composer
+RUN curl -sS https://getcomposer.org/installer | php
+RUN mv composer.phar /usr/local/bin/composer
+
+# Download the patched PHP protobuf so that PHP gRPC clients can be generated
+# from proto3 schemas.
+RUN git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php
+
+RUN /bin/bash -l -c "rvm use ruby-2.1 ${'\\'}
+ && cd /var/local/git/protobuf-php ${'\\'}
+ && rvm all do rake pear:package version=1.0 ${'\\'}
+ && pear install Protobuf-1.0.tgz"
+
+# Define the default command.
+CMD ["bash"]