Skip to content

Commit 9ce470e

Browse files
author
Patrick Mac Gregor
committed
[php-worker] dedicated dockerfile for php 7.0/7.1
fixes laradock#927: PHP-Worker container uses PHP-CLI 7.0.9 despite workspace using 7.1.4
1 parent 38fb49b commit 9ce470e

3 files changed

Lines changed: 83 additions & 4 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ services:
100100
php-worker:
101101
build:
102102
context: ./php-worker
103+
dockerfile: "Dockerfile-${PHP_VERSION}"
103104
volumes_from:
104105
- applications
105106
depends_on:
Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,30 @@
33
# Image Setup
44
#--------------------------------------------------------------------------
55
#
6-
# To take a look at the'php-worker' base Image, visit its DockerHub page
7-
# https://hub.docker.com/r/nielsvdoorn/laravel-supervisor/
8-
#
96

10-
FROM nielsvdoorn/laravel-supervisor
7+
FROM php:7.0-alpine
118

129
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
1310

11+
RUN apk --update add wget \
12+
curl \
13+
git \
14+
build-base \
15+
libmemcached-dev \
16+
libmcrypt-dev \
17+
libxml2-dev \
18+
zlib-dev \
19+
autoconf \
20+
cyrus-sasl-dev \
21+
libgsasl-dev \
22+
supervisor
23+
24+
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql mcrypt tokenizer xml
25+
RUN pecl channel-update pecl.php.net && pecl install memcached && docker-php-ext-enable memcached
26+
27+
RUN rm /var/cache/apk/* \
28+
&& mkdir -p /var/www
29+
1430
#
1531
#--------------------------------------------------------------------------
1632
# Optional Supervisord Configuration
@@ -19,8 +35,11 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
1935
# Modify the ./supervisor.conf file to match your App's requirements.
2036
# Make sure you rebuild your container with every change.
2137
#
38+
2239
COPY supervisord.conf /etc/supervisord.conf
2340

41+
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
42+
2443
#
2544
#--------------------------------------------------------------------------
2645
# Optional Software's Installation

php-worker/Dockerfile-71

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#
2+
#--------------------------------------------------------------------------
3+
# Image Setup
4+
#--------------------------------------------------------------------------
5+
#
6+
7+
FROM php:7.1-alpine
8+
9+
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
10+
11+
RUN apk --update add wget \
12+
curl \
13+
git \
14+
build-base \
15+
libmemcached-dev \
16+
libmcrypt-dev \
17+
libxml2-dev \
18+
zlib-dev \
19+
autoconf \
20+
cyrus-sasl-dev \
21+
libgsasl-dev \
22+
supervisor
23+
24+
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql mcrypt tokenizer xml
25+
RUN pecl channel-update pecl.php.net && pecl install memcached && docker-php-ext-enable memcached
26+
27+
RUN rm /var/cache/apk/* \
28+
&& mkdir -p /var/www
29+
30+
#
31+
#--------------------------------------------------------------------------
32+
# Optional Supervisord Configuration
33+
#--------------------------------------------------------------------------
34+
#
35+
# Modify the ./supervisor.conf file to match your App's requirements.
36+
# Make sure you rebuild your container with every change.
37+
#
38+
39+
COPY supervisord.conf /etc/supervisord.conf
40+
41+
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]
42+
43+
#
44+
#--------------------------------------------------------------------------
45+
# Optional Software's Installation
46+
#--------------------------------------------------------------------------
47+
#
48+
# If you need to modify this image, feel free to do it right here.
49+
#
50+
# -- Your awesome modifications go here -- #
51+
52+
53+
#
54+
#--------------------------------------------------------------------------
55+
# Final Touch
56+
#--------------------------------------------------------------------------
57+
#
58+
59+
WORKDIR /etc/supervisor/conf.d/

0 commit comments

Comments
 (0)