-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-php
More file actions
37 lines (28 loc) · 1.1 KB
/
Dockerfile-php
File metadata and controls
37 lines (28 loc) · 1.1 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
FROM ubuntu:20.04
RUN apt-get update -y \
&& apt-get upgrade -y \
&& apt-get update -y \
&& apt-get install tzdata curl -y
RUN ln -fs /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
RUN apt-get -y install apache2
RUN apt-get -y install php php-bcmath php-bz2 php-intl php-gd php-mbstring php-mysql php-zip php-fpm php-cli php-json php-curl php-xml php-soap \
&& a2enmod headers \
&& a2enmod rewrite
RUN apt-get install php-json
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
RUN ln -sf /dev/stdout /var/log/apache2/access.log && \
ln -sf /dev/stderr /var/log/apache2/error.log
RUN mkdir -p $APACHE_RUN_DIR $APACHE_LOCK_DIR $APACHE_LOG_DIR
# ADD ./src/web /var/www/html
# RUN chmod 775 -R /var/www/html/vendor/*
# RUN chown -R www-data:www-data /var/www/html/vendor/*
VOLUME [ "/var/www/html" ]
WORKDIR /var/www/html
EXPOSE 80
ENTRYPOINT [ "/usr/sbin/apache2" ]
CMD ["-D" , "FOREGROUND"]