-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp-7-2-fpm.Dockerfile
82 lines (67 loc) · 2.18 KB
/
php-7-2-fpm.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
81
82
FROM php:7.2-fpm as build-php-7-2-fpm
# Set some image labels
LABEL evilwizardcreations.image.authors="evil.wizard95@googlemail.com" \
evilwizardcreations.image.php.version="7.2"
ARG NPM_VERSION=7.24.2
ENV NPM_VERSION=$NPM_VERSION
# copy the specific Composer PHAR version from the Composer image into the PHP image
COPY --from=composer:1.10.1 /usr/bin/composer /usr/bin/composer
# Download the nodejs setup & set that it's a docker env.
ENV NODE_ENV docker
# Node -v v14
RUN curl --silent --location https://deb.nodesource.com/setup_14.x | bash
# yarn -v 1.15.2
# Install some extra stuff
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
libxml2-dev \
libzip-dev \
libyaml-dev \
zip \
unzip \
git \
nodejs \
default-mysql-client \
vim; \
apt-get clean; \
npm i npm@$NPM_VERSION -g
# Install some php extensions from the docker built source.
RUN docker-php-ext-install gettext mysqli pdo_mysql zip
RUN pecl install yaml && \
docker-php-ext-enable yaml
WORKDIR /var/www
# A test build to play with while getting it all working
FROM php:7.2-fpm as build-php-7-2-fpm-test
# Set some image labels
LABEL evilwizardcreations.image.authors="evil.wizard95@googlemail.com" \
evilwizardcreations.image.php.version="7.2"
ARG NPM_VERSION=7.24.2
ENV NPM_VERSION=$NPM_VERSION
# copy the specific Composer PHAR version from the Composer image into the PHP image
COPY --from=composer:1.10.1 /usr/bin/composer /usr/bin/composer
# Download the nodejs setup & set that it's a docker env.
ENV NODE_ENV docker
# Node -v v14
RUN curl --silent --location https://deb.nodesource.com/setup_14.x | bash
# yarn -v 1.15.2
# Install some extra stuff
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
libxml2-dev \
libzip-dev \
libyaml-dev \
zip \
unzip \
git \
nodejs \
default-mysql-client \
vim; \
apt-get clean; \
npm i npm@$NPM_VERSION -g
# Install some php extensions from the docker built source.
RUN docker-php-ext-install gettext mysqli pdo_mysql zip
RUN pecl install yaml && \
docker-php-ext-enable yaml
WORKDIR /var/www