-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathDockerfile
More file actions
60 lines (51 loc) · 1.33 KB
/
Dockerfile
File metadata and controls
60 lines (51 loc) · 1.33 KB
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
FROM php:8.3-apache
# packages
RUN sed -i 's|main|main non-free|' /etc/apt/sources.list.d/debian.sources && apt-get update && apt-get install -y \
unixodbc \
unixodbc-dev \
freetds-bin \
freetds-dev \
libicu-dev \
git \
unzip \
libzip-dev \
libpng-dev \
libonig-dev \
libxml2-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
curl
# cleanup
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# php libs
RUN docker-php-ext-install \
intl \
pdo_mysql \
soap \
zip \
mbstring \
bcmath \
pdo_dblib
# gd
RUN docker-php-ext-configure gd --with-freetype --with-jpeg && \
docker-php-ext-install gd
# php memory
ENV PHP_MEMORY_LIMIT=512M
ENV PHP_UPLOAD_LIMIT=512M
RUN { \
echo 'memory_limit=${PHP_MEMORY_LIMIT}'; \
echo 'upload_max_filesize=${PHP_UPLOAD_LIMIT}'; \
echo 'post_max_size=${PHP_UPLOAD_LIMIT}'; \
} > "${PHP_INI_DIR}/conf.d/upload.ini"
# apache
RUN a2enmod rewrite
RUN sed -i 's|/var/www/html|/var/www/html/public|' /etc/apache2/sites-available/000-default.conf
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
# composer
USER www-data
COPY --chown=www-data . .
RUN composer install --optimize-autoloader --no-interaction
CMD ["./serve.sh"]