-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (30 loc) · 1.09 KB
/
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 debian
LABEL maintainer="[email protected]"
ADD . /app
WORKDIR /app
RUN apt-get update && apt-get -y upgrade
# install php
RUN apt-get install -y apt-transport-https lsb-release ca-certificates wget
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
RUN echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
RUN apt-get update && apt-get -y upgrade
RUN apt-get -y install curl
RUN apt-get -y install php7.2 php7.2-common php7.2-cli php7.2-fpm php7.2-zip php7.2-xml
RUN apt-get -y install php7.2-common php7.2-json php7.2-curl php7.2-mbstring php7.2-bcmath php7.2-mysql
RUN apt-get -y install composer
# install nginx
RUN apt-get -y install nginx
RUN apt-get -y install unzip zip
RUN rm /etc/nginx/sites-enabled/default
RUN cp /app/docker/nginx.conf /etc/nginx/sites-enabled/default
RUN composer install
RUN chmod -R 777 /app
RUN chown -R www-data:www-data /app
RUN service php7.2-fpm restart
RUN service nginx restart
# default envs vars
ENV APP_NAME example
ENV APP_ENV prod
ENV DEBUG 0
EXPOSE 80
CMD sh /app/docker/start.sh