-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
62 lines (52 loc) · 1.25 KB
/
Copy pathDockerfile
File metadata and controls
62 lines (52 loc) · 1.25 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
61
62
FROM php:8.4-apache
# System dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
libpng-dev \
libonig-dev \
libzip-dev \
libicu-dev \
libjpeg-dev \
libfreetype6-dev \
zip \
unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# PHP extensions
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install \
pdo \
pdo_mysql \
mbstring \
exif \
pcntl \
bcmath \
gd \
zip \
fileinfo \
intl \
opcache
# APCu
RUN pecl install apcu \
&& docker-php-ext-enable apcu
# Apache modules
RUN a2enmod rewrite headers expires deflate
# Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# PHP config
COPY .docker/php.ini /usr/local/etc/php/conf.d/99-app.ini
# Apache config
COPY .docker/apache.conf /etc/apache2/sites-available/000-default.conf
# Application
WORKDIR /var/www/html
COPY composer.json composer.lock ./
RUN composer install --no-dev --optimize-autoloader --no-interaction
COPY . .
# Permissions
RUN mkdir -p App/Storage/Logs App/Storage/Cache Public/upload \
&& chown -R www-data:www-data App/Storage Public/upload \
&& chmod -R 775 App/Storage Public/upload
# Runtime
EXPOSE 80
CMD ["apache2-foreground"]