-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Dockerfile that runs test for PHP 7.3
- Loading branch information
1 parent
35bde91
commit ddda96f
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM php:7.3-stretch | ||
|
||
ENV CFLAGS="-fstack-protector-strong -fpic -fpie -O2" | ||
ENV CPPFLAGS="$PHP_CFLAGS" | ||
ENV LDFLAGS="-Wl,-O1 -Wl,--hash-style=both -pie" | ||
|
||
ENV PECL_MEMCACHE_URL_GIT="https://github.com/websupport-sk/pecl-memcache.git" | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
zlib1g-dev \ | ||
memcached ; | ||
|
||
RUN mkdir -p /var/run/memcached | ||
RUN chown memcache:memcache /var/run/memcached | ||
|
||
COPY host.conf /etc/host.conf | ||
|
||
RUN set -eux;\ | ||
cd /usr/src; \ | ||
\ | ||
git clone "$PECL_MEMCACHE_URL_GIT"; \ | ||
\ | ||
cd pecl-memcache; \ | ||
phpize ; \ | ||
./configure ; \ | ||
make -j2; | ||
|
||
RUN echo "" | ||
|
||
COPY start.sh / | ||
CMD ["/start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
order hosts,bind | ||
multi off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# Spawn memcached for tests | ||
/usr/bin/memcached -m 64 -u memcache -l 127.0.0.1 -s /var/run/memcached/memcached.sock -d | ||
/usr/bin/memcached -m 64 -u memcache -U 11211 -l 127.0.0.1 -p 11211 -d | ||
/usr/bin/memcached -m 64 -u memcache -U 11212 -l 127.0.0.1 -p 11212 -d | ||
|
||
# Let's start tests | ||
cd /usr/src/pecl-memcache | ||
TEST_PHP_ARGS="--show-diff --keep-all -w fails.log" make test |