Skip to content

Commit

Permalink
Added Dockerfile that runs test for PHP 7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
tomassrnka committed Mar 19, 2019
1 parent 35bde91 commit ddda96f
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docker/7.3/Dockerfile
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"]
2 changes: 2 additions & 0 deletions docker/7.3/host.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
order hosts,bind
multi off
10 changes: 10 additions & 0 deletions docker/7.3/start.sh
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

0 comments on commit ddda96f

Please sign in to comment.