/
Dockerfile
97 lines (86 loc) · 2.18 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
FROM composer:latest as composer
FROM php:8.2-fpm
ADD ./extra.ini /usr/local/etc/php/conf.d/
# User/Group globals
ENV MY_USER="phalcon" \
MY_GROUP="phalcon" \
MY_UID="1000" \
MY_GID="1000" \
PHP_VERSION="8.2" \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_ALL=en_US.UTF-8
# User and Group
RUN set -eux && \
groupadd -g ${MY_GID} -r ${MY_GROUP} && \
useradd -u ${MY_UID} -m -s /bin/bash -g ${MY_GROUP} ${MY_USER}
# Update
RUN apt update -y && \
apt install -y \
apt-utils \
gettext \
git \
libgmp-dev \
libicu-dev \
libmagickwand-dev \
libmemcached-dev \
libpng-dev \
libpq-dev \
libyaml-dev \
libwebp-dev \
libxpm-dev \
libzip-dev \
locales \
nano \
sudo \
wget \
zip
# PECL Packages
RUN pecl install -o -f redis && \
pecl install igbinary \
msgpack \
apcu \
yaml \
imagick \
memcached \
xdebug \
zephir_parser
# Locale
RUN sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# el_GR.UTF-8 UTF-8/el_GR.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# es_ES.UTF-8 UTF-8/es_ES.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8
# Install PHP extensions
RUN docker-php-ext-configure gd --with-freetype \
--with-jpeg=/usr/include/ \
--with-xpm \
--with-webp \
--enable-gd
RUN docker-php-ext-install \
gd \
gettext \
gmp \
intl \
pdo_mysql \
pdo_pgsql \
zip
# Install PHP extensions
RUN docker-php-ext-enable \
redis \
igbinary \
msgpack \
apcu \
imagick \
yaml \
memcached \
xdebug \
zephir_parser
# Composer
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
# Bash script with helper aliases
COPY ./.bashrc /root/.bashrc
COPY ./.bashrc /home/phalcon/.bashrc
CMD ["php-fpm"]