-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
117 lines (87 loc) · 2.88 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
FROM php:8.1.12-apache
RUN a2enmod rewrite
# Set environment variables
ENV SYMFONY_VERSION=6 \
COMPOSER_ALLOW_SUPERUSER=1 \
PATH=/var/www/html/vendor/bin:$PATH
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
libicu-dev \
libpng-dev \
libzip-dev \
nano \
unzip \
zip
# Install PHP extensions
RUN docker-php-ext-install \
bcmath \
intl \
opcache \
zip \
exif
RUN apt-get install -y ca-certificates curl gnupg; \
mkdir -p /etc/apt/keyrings; \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg; \
NODE_MAJOR=18; \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" \
> /etc/apt/sources.list.d/nodesource.list; \
apt-get update; \
apt-get install nodejs -y;
# Install Yarn
RUN npm install -g yarn
RUN apt-get update && apt-get install -y \
libmagickwand-dev --no-install-recommends \
&& pecl install imagick \
&& docker-php-ext-enable imagick
# Install AMQP extension
RUN apt-get install -y librabbitmq-dev && \
pecl install amqp && \
docker-php-ext-enable amqp
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
ENV SYMFONY_DEPRECATIONS_HELPER=weak
# RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
# Chromium and ChromeDriver
ENV PANTHER_NO_SANDBOX 1
# Not mandatory, but recommended
ENV PANTHER_CHROME_ARGUMENTS='--disable-dev-shm-usage'
RUN LC_ALL=fr_FR.UTF-8
COPY php.ini /php.ini
RUN cat /php.ini>>${PHP_INI_DIR}/php.ini
# Install Xdebug
# RUN pecl install xdebug && \
# docker-php-ext-enable xdebug
#MYSQL
RUN docker-php-ext-configure mysqli --with-mysqli=mysqlnd \
&& docker-php-ext-install pdo pdo_mysql
#APCU
ENV EXT_APCU_VERSION=5.1.22
RUN docker-php-source extract \
&& mkdir -p /usr/src/php/ext/apcu \
&& curl -fsSL https://github.com/krakjoe/apcu/archive/v$EXT_APCU_VERSION.tar.gz | tar xvz -C /usr/src/php/ext/apcu --strip 1 \
&& docker-php-ext-install apcu \
&& docker-php-source delete
RUN wget https://github.com/dantleech/fink/releases/download/0.10.3/fink.phar
RUN chmod +x fink.phar
RUN mv fink.phar /usr/bin/fink.phar
# chromium-driver
RUN apt install memcached libmemcached-tools libnss3 chromium -y
#GD
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev
RUN docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
RUN docker-php-ext-install gd
#webp
RUN apt-get install -y webp
#cache pour apache
RUN a2enmod cache
RUN a2enmod cache_disk
RUN a2enmod headers
COPY apache.conf /etc/apache2/sites-enabled/000-default.conf
COPY . /app
WORKDIR /app
RUN echo 'alias sc="php /app/bin/console"' >> ~/.bashrc
CMD ["apache2-foreground"]