-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp-5.6-cli.Dockerfile
80 lines (67 loc) · 2.4 KB
/
php-5.6-cli.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
FROM php:5.6-cli-alpine as build-php-56-cli
# Set some image labels
LABEL evilwizardcreations.image.authors="[email protected]" \
evilwizardcreations.image.php.version="5.6" \
evilwizardcreations.image.name="Legacy PHP 5.6 CLI"
# The pecl is so old it needs the local offline install now
COPY ./build-assets/pecl/yaml-1.3.0.tgz /tmp/yaml-1.3.0.tgz
# copy the 5.6 specific php.ini override configuration
COPY ./build-assets/php/56.local.ini /usr/local/etc/php.ini
# copy the specific Composer PHAR version from the Composer image into the PHP image
COPY --from=composer:1.7.1 /usr/bin/composer /usr/bin/composer
# Install some extra stuff
RUN set -ex; \
apk update; \
apk add libxml2-dev \
libzip-dev \
yaml \
yaml-dev \
zip \
unzip \
git \
gettext \
gettext-dev \
mariadb-dev \
vim \
pcre-dev ${PHPIZE_DEPS} \
autoconf
# Install some php extensions from the docker built source.
RUN docker-php-ext-install gettext mysqli pdo_mysql zip
RUN pecl install --offline /tmp/yaml-1.3.0.tgz && \
docker-php-ext-enable yaml && \
apk del pcre-dev ${PHPIZE_DEPS} && \
rm /tmp/yaml-1.3.0.tgz
# A test build to play with while getting it all working
FROM php:5.6-cli-alpine as build-php-56-cli-test
# Set some image labels
LABEL evilwizardcreations.image.authors="[email protected]" \
evilwizardcreations.image.php.version="5.6" \
evilwizardcreations.image.name="Legacy PHP 5.6 CLI"
# The pecl is so old it needs the local offline install now
COPY ./build-assets/pecl/yaml-1.3.0.tgz /tmp/yaml-1.3.0.tgz
# copy the 5.6 specific php.ini override configuration
COPY ./build-assets/php/56.local.ini /usr/local/etc/php.ini
# copy the specific Composer PHAR version from the Composer image into the PHP image
COPY --from=composer:1.7.1 /usr/bin/composer /usr/bin/composer
# Install some extra stuff
RUN set -ex; \
apk update; \
apk add libxml2-dev \
libzip-dev \
yaml \
yaml-dev \
zip \
unzip \
git \
gettext \
gettext-dev \
mariadb-dev \
vim \
pcre-dev ${PHPIZE_DEPS} \
autoconf
# Install some php extensions from the docker built source.
RUN docker-php-ext-install gettext mysqli pdo_mysql zip
RUN pecl install --offline /tmp/yaml-1.3.0.tgz && \
docker-php-ext-enable yaml && \
apk del pcre-dev ${PHPIZE_DEPS} && \
rm /tmp/yaml-1.3.0.tgz