-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (45 loc) · 1.29 KB
/
Dockerfile
File metadata and controls
55 lines (45 loc) · 1.29 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM alpine:edge
MAINTAINER Jonathan Lamim Antunes <dev@jlamim.com.br>
# Install packages
RUN apk --update add \
php7 \
php7-dom \
php7-fpm \
php7-mbstring \
php7-mcrypt \
php7-opcache \
php7-pdo \
php7-pdo_mysql \
php7-pdo_pgsql \
php7-mysqli \
php7-xml \
php7-phar \
php7-openssl \
php7-json \
php7-ctype \
php7-session \
nodejs \
git \
ca-certificates \
nginx \
curl \
supervisor \
&& rm -rf /var/cache/apk/*
# Creating symbolic link to php
RUN ln -s /usr/bin/php7 /usr/bin/php
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
# Configure Nginx
COPY config/nginx/nginx.conf /etc/nginx/nginx.conf
COPY config/nginx/default /etc/nginx/sites-enabled/default
# Configure PHP-FPM
COPY config/php/php.ini /etc/php7/conf.d/zzz_custom.ini
COPY config/php/www.conf /etc/php/7.0/fpm/pool.d/www.conf
# Configure supervisord
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Add application
RUN mkdir -p /var/www/src
WORKDIR /var/www/src
COPY src/ /var/www/src/
EXPOSE 80 443
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]