Skip to content

Commit e2ca133

Browse files
Mihkel Kivisildmrts
authored andcommitted
Updated dependencies for and added containerizing for php example
WE2-918
1 parent aaebb32 commit e2ca133

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

example/Dockerfile.Apache

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM php:apache
2+
3+
COPY . /var/www/html
4+
5+
RUN apt-get update
6+
RUN apt-get install ssl-cert unzip
7+
8+
COPY --from=composer /usr/bin/composer /usr/bin/composer
9+
RUN composer install
10+
11+
ENV APACHE_DOCUMENT_ROOT /var/www/html/public
12+
13+
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
14+
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
15+
16+
# In case you need to control error reporting
17+
#RUN echo "error_reporting=E_ALL & ~E_DEPRECATED" >> /usr/local/etc/php/conf.d/error_reporting.ini
18+
19+
RUN a2enmod rewrite
20+
RUN a2enmod ssl
21+
RUN a2ensite default-ssl
22+

example/Dockerfile.PhpFpm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM php:fpm
2+
3+
WORKDIR /var/www/html/web-eid-php-proxy
4+
5+
COPY . .
6+
7+
RUN apt-get update
8+
RUN apt-get install unzip
9+
10+
COPY --from=composer /usr/bin/composer /usr/bin/composer
11+
RUN composer install

0 commit comments

Comments
 (0)