-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (34 loc) · 846 Bytes
/
Dockerfile
File metadata and controls
41 lines (34 loc) · 846 Bytes
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
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 \
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
# packages
RUN docker-php-ext-install \
intl \
pdo_mysql \
zip \
mbstring \
bcmath
# 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
CMD ["./serve.sh"]