-
Notifications
You must be signed in to change notification settings - Fork 31
/
Dockerfile
30 lines (25 loc) · 956 Bytes
/
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
FROM composer:latest
RUN apk upgrade --update && apk add \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd
WORKDIR /beep
COPY . /beep
RUN ls -l && composer install && mv storage storage.bak && chmod -R 777 bootstrap/cache
FROM php:7.4-apache
WORKDIR /var/www/html/
COPY --from=0 /beep/ .
COPY apache/docker.conf /etc/apache2/sites-enabled/
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
netcat \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd && docker-php-ext-install pdo pdo_mysql \
&& a2enmod rewrite \
&& sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' \
/etc/apache2/apache2.conf
ENTRYPOINT [ "./docker-run.sh" ]