-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
32 lines (26 loc) · 863 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
31
32
FROM php:apache
ENV COMPOSER_ALLOW_SUPERUSER=1
EXPOSE 80
WORKDIR /var/www/html/
RUN apt-get update -qq && \
apt-get install -qy \
git \
gnupg \
unzip \
zip && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# PHP Extensions
RUN docker-php-ext-install -j$(nproc) opcache pdo_mysql
# Apache
COPY config/prod/apache2/conf-available/swag.conf /etc/apache2/conf-available/swag.conf
COPY /config/prod/apache2/sites-enabled /etc/apache2/sites-enabled/
COPY app/ /var/www/html/
RUN mkdir -p /var/www/html/file/
RUN mkdir -p /var/www/html/db/
RUN chmod -R 777 /var/www/html/db/
RUN chmod -R 777 /var/www/html/file/
RUN a2enmod rewrite
RUN a2enmod remoteip && \
a2enconf swag && \
/etc/init.d/apache2 restart