20 lines
647 B
Docker
20 lines
647 B
Docker
FROM php:7.0-apache
|
|
|
|
RUN docker-php-ext-install pdo pdo_mysql mysqli
|
|
RUN a2enmod rewrite ssl
|
|
|
|
COPY backend /var/www/html
|
|
WORKDIR /var/www/html
|
|
RUN ln -s ../html api
|
|
|
|
COPY docker/apache/apache2.conf /etc/apache2/
|
|
COPY docker/apache/default-ssl.conf /etc/apache2/sites-available/default-ssl.conf
|
|
|
|
RUN chown -R www-data:www-data /var/www/html
|
|
|
|
RUN openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 \
|
|
-subj "/C=BA/ST=FBiH/L=Sarajevo/O=Saburly/CN=localhost" \
|
|
-keyout /etc/ssl/private/selfsigned.key -out /etc/ssl/certs/selfsigned.crt
|
|
|
|
WORKDIR /etc/apache2/sites-enabled
|
|
RUN ln -s ../sites-available/default-ssl.conf default-ssl.conf |