forked from markshust/docker-magento
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
118 lines (106 loc) · 3.05 KB
/
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
FROM php:8.3-fpm-bookworm
MAINTAINER Mark Shust <[email protected]>
ARG APP_ID=1000
RUN groupadd -g "$APP_ID" app \
&& useradd -g "$APP_ID" -u "$APP_ID" -d /var/www -s /bin/bash app
RUN mkdir -p /etc/nginx/html /var/www/html /sock \
&& chown -R app:app /etc/nginx /var/www /usr/local/etc/php/conf.d /sock
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
RUN apt-get update && apt-get install -y \
cron \
default-mysql-client \
git \
gnupg \
gzip \
libbz2-dev \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libmagickwand-dev \
libmcrypt-dev \
libonig-dev \
libpng-dev \
libsodium-dev \
libssh2-1-dev \
libwebp-dev \
libxslt1-dev \
libzip-dev \
lsof \
mailutils \
msmtp \
nodejs \
procps \
strace \
vim \
zip \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
RUN pecl channel-update pecl.php.net && pecl install \
redis-6.0.2 \
ssh2-1.3.1 \
xdebug-3.3.1 \
&& pecl clear-cache \
&& rm -rf /tmp/pear
RUN curl -L https://github.com/Imagick/imagick/archive/28f27044e435a2b203e32675e942eb8de620ee58.zip -o imagick.zip \
&& unzip imagick.zip \
&& rm imagick.zip \
&& cd imagick-28f27044e435a2b203e32675e942eb8de620ee58 \
&& phpize \
&& ./configure --with-php-config=/usr/local/bin/php-config \
&& make \
&& make install \
&& echo "extension=imagick.so" >> $PHP_INI_DIR/conf.d/imagick.ini \
&& cd .. \
&& rm -rf imagick-28f27044e435a2b203e32675e942eb8de620ee58
RUN docker-php-ext-configure \
gd --with-freetype --with-jpeg --with-webp \
&& docker-php-ext-install \
bcmath \
bz2 \
calendar \
exif \
gd \
gettext \
intl \
mbstring \
mysqli \
opcache \
pcntl \
pdo_mysql \
soap \
sockets \
sodium \
sysvmsg \
sysvsem \
sysvshm \
xsl \
zip \
&& docker-php-ext-enable \
imagick \
redis \
ssh2 \
xdebug
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& architecture=$(uname -m) \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
&& mkdir -p /tmp/blackfire \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
RUN git clone --branch v0.4.15 --depth=1 https://github.com/NoiseByNorthwest/php-spx.git /usr/lib/php-spx \
&& cd /usr/lib/php-spx \
&& phpize \
&& ./configure \
&& make \
&& make install
RUN curl -sS https://getcomposer.org/installer | \
php -- --version=2.6.6 --install-dir=/usr/local/bin --filename=composer
COPY conf/blackfire.ini $PHP_INI_DIR/conf.d/blackfire.ini
COPY conf/spx.ini $PHP_INI_DIR/conf.d/spx.ini
COPY conf/msmtprc /etc/msmtprc
COPY conf/php.ini $PHP_INI_DIR
COPY conf/php-fpm.conf /usr/local/etc/
COPY conf/www.conf /usr/local/etc/php-fpm.d/
USER app:app
VOLUME /var/www
WORKDIR /var/www/html