Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
8bd15429
Unverified
Commit
8bd15429
authored
Dec 11, 2018
by
Paul Yang
Committed by
GitHub
Dec 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add docker file for php testing. (#5447)
parent
d7cd5437
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
195 additions
and
0 deletions
+195
-0
push_testing_images.sh
kokoro/linux/dockerfile/push_testing_images.sh
+29
-0
Dockerfile
kokoro/linux/dockerfile/test/php/Dockerfile
+166
-0
No files found.
kokoro/linux/dockerfile/push_testing_images.sh
0 → 100755
View file @
8bd15429
#!/bin/bash
set
-ex
cd
$(
dirname
$0
)
/../../..
git_root
=
$(
pwd
)
cd
-
DOCKERHUB_ORGANIZATION
=
protobuf
for
DOCKERFILE_DIR
in
test
/
*
do
# Generate image name based on Dockerfile checksum. That works well as long
# as can count on dockerfiles being written in a way that changing the logical
# contents of the docker image always changes the SHA (e.g. using "ADD file"
# cmd in the dockerfile in not ok as contents of the added file will not be
# reflected in the SHA).
DOCKER_IMAGE_NAME
=
$(
basename
$DOCKERFILE_DIR
)
_
$(
sha1sum
$DOCKERFILE_DIR
/Dockerfile |
cut
-f1
-d
\
)
echo
$DOCKER_IMAGE_NAME
# skip the image if it already exists in the repo
curl
--silent
-f
-lSL
https://registry.hub.docker.com/v2/repositories/
${
DOCKERHUB_ORGANIZATION
}
/
${
DOCKER_IMAGE_NAME
}
/tags/latest
>
/dev/null
\
&&
continue
docker build
-t
${
DOCKERHUB_ORGANIZATION
}
/
${
DOCKER_IMAGE_NAME
}
${
DOCKERFILE_DIR
}
# "docker login" needs to be run in advance
docker push
${
DOCKERHUB_ORGANIZATION
}
/
${
DOCKER_IMAGE_NAME
}
done
kokoro/linux/dockerfile/test/php/Dockerfile
0 → 100644
View file @
8bd15429
FROM
debian:stretch
# Install dependencies. We start with the basic ones require to build protoc
# and the C++ build
RUN
apt-get clean
&&
apt-get update
&&
apt-get
install
-y
--force-yes
\
autoconf
\
autotools-dev
\
build-essential
\
bzip2
\
ccache
\
curl
\
gcc
\
git
\
libc6
\
libc6-dbg
\
libc6-dev
\
libgtest-dev
\
libtool
\
make
\
parallel
\
time
\
wget
\
&&
apt-get clean
# Install php dependencies
RUN
apt-get clean
&&
apt-get update
&&
apt-get
install
-y
--force-yes
\
php
\
libxml2-dev
\
&&
apt-get clean
# Install other dependencies
RUN
ln
-sf
/usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
RUN
wget http://ftp.gnu.org/gnu/bison/bison-2.6.4.tar.gz
-O
/var/local/bison-2.6.4.tar.gz
RUN
cd
/var/local
\
&&
tar
-zxvf
bison-2.6.4.tar.gz
\
&&
cd
/var/local/bison-2.6.4
\
&&
./configure
\
&&
make
\
&&
make
install
# Install composer
RUN
curl
-sS
https://getcomposer.org/installer | php
RUN
mv
composer.phar /usr/local/bin/composer
# Download php source code
RUN
git clone https://github.com/php/php-src
# php 5.5
RUN
cd
php-src
\
&&
git checkout PHP-5.5.38
\
&&
./buildconf
--force
RUN
cd
php-src
\
&&
./configure
--enable-bcmath
--prefix
=
/usr/local/php-5.5
\
&&
make
\
&&
make
install
\
&&
make clean
RUN
cd
php-src
\
&&
./configure
--enable-maintainer-zts
--prefix
=
/usr/local/php-5.5-zts
\
&&
make
\
&&
make
install
\
&&
make clean
RUN
wget
-O
phpunit https://phar.phpunit.de/phpunit-4.phar
\
&&
chmod
+x phpunit
\
&&
cp
phpunit /usr/local/php-5.5
\
&&
mv
phpunit /usr/local/php-5.5-zts
# php 5.6
RUN
cd
php-src
\
&&
git checkout PHP-5.6.39
\
&&
./buildconf
--force
RUN
cd
php-src
\
&&
./configure
--enable-bcmath
--prefix
=
/usr/local/php-5.6
\
&&
make
\
&&
make
install
\
&&
make clean
RUN
cd
php-src
\
&&
./configure
--enable-maintainer-zts
--prefix
=
/usr/local/php-5.6-zts
\
&&
make
\
&&
make
install
\
&&
make clean
RUN
wget
-O
phpunit https://phar.phpunit.de/phpunit-5.phar
\
&&
chmod
+x phpunit
\
&&
cp
phpunit /usr/local/php-5.6
\
&&
mv
phpunit /usr/local/php-5.6-zts
# php 7.0
RUN
cd
php-src
\
&&
git checkout PHP-7.0.33
\
&&
./buildconf
--force
RUN
cd
php-src
\
&&
./configure
--enable-bcmath
--prefix
=
/usr/local/php-7.0
\
&&
make
\
&&
make
install
\
&&
make clean
RUN
cd
php-src
\
&&
./configure
--enable-maintainer-zts
--prefix
=
/usr/local/php-7.0-zts
\
&&
make
\
&&
make
install
\
&&
make clean
RUN
wget
-O
phpunit https://phar.phpunit.de/phpunit-6.phar
\
&&
chmod
+x phpunit
\
&&
cp
phpunit /usr/local/php-7.0
\
&&
mv
phpunit /usr/local/php-7.0-zts
# php 7.1
RUN
cd
php-src
\
&&
git checkout PHP-7.1.25
\
&&
./buildconf
--force
RUN
cd
php-src
\
&&
./configure
--enable-bcmath
--prefix
=
/usr/local/php-7.1
\
&&
make
\
&&
make
install
\
&&
make clean
RUN
cd
php-src
\
&&
./configure
--enable-maintainer-zts
--prefix
=
/usr/local/php-7.1-zts
\
&&
make
\
&&
make
install
\
&&
make clean
RUN
wget
-O
phpunit https://phar.phpunit.de/phpunit-7.phar
\
&&
chmod
+x phpunit
\
&&
cp
phpunit /usr/local/php-7.1
\
&&
mv
phpunit /usr/local/php-7.1-zts
# php 7.2
RUN
cd
php-src
\
&&
git checkout PHP-7.2.13
\
&&
./buildconf
--force
RUN
cd
php-src
\
&&
./configure
--enable-bcmath
--prefix
=
/usr/local/php-7.2
\
&&
make
\
&&
make
install
\
&&
make clean
RUN
cd
php-src
\
&&
./configure
--enable-maintainer-zts
--prefix
=
/usr/local/php-7.2-zts
\
&&
make
\
&&
make
install
\
&&
make clean
RUN
wget
-O
phpunit https://phar.phpunit.de/phpunit-7.phar
\
&&
chmod
+x phpunit
\
&&
cp
phpunit /usr/local/php-7.2
\
&&
mv
phpunit /usr/local/php-7.2-zts
# php 7.3
RUN
cd
php-src
\
&&
git checkout PHP-7.3.0
\
&&
./buildconf
--force
RUN
cd
php-src
\
&&
./configure
--enable-bcmath
--prefix
=
/usr/local/php-7.3
\
&&
make
\
&&
make
install
\
&&
make clean
RUN
cd
php-src
\
&&
./configure
--enable-maintainer-zts
--prefix
=
/usr/local/php-7.3-zts
\
&&
make
\
&&
make
install
\
&&
make clean
RUN
wget
-O
phpunit https://phar.phpunit.de/phpunit-7.phar
\
&&
chmod
+x phpunit
\
&&
cp
phpunit /usr/local/php-7.3
\
&&
mv
phpunit /usr/local/php-7.3-zts
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment