-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
80 lines (68 loc) · 1.71 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
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
FROM alpine:3.21.0
LABEL maintainer="Nurettin Topal <[email protected]>"
# Install php84
RUN apk --update add php84
#RUN ls /usr/bin
#RUN php -v
#RUN ln -s /usr/bin/php8 /usr/bin/php
# Install packages
RUN apk --update add \
nginx \
supervisor \
git \
curl \
unzip \
nano \
wget \
gzip \
openssl \
zlib \
bash \
php84-fpm \
php84-posix \
php84-session \
php84-mbstring \
php84-json \
php84-xml \
php84-curl \
php84-iconv \
php84-dom \
php84-phar \
php84-openssl \
php84-tokenizer \
php84-xmlwriter \
php84-simplexml \
php84-ctype \
php84-fileinfo \
php84-zlib \
php84-bcmath \
php84-mysqlnd \
redis \
php84-redis \
php84-pdo \
php84-mysqli \
php84-pdo_mysql \
php84-pcntl
RUN ln -s /usr/bin/php84 /usr/bin/php
# Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer --version=2.8.3
# Configure nginx
COPY config/nginx.conf /etc/nginx/nginx.conf
# Configure PHP-FPM
COPY config/fpm-pool.conf /etc/php84/php-fpm.d/docker_custom.conf
COPY config/php.ini /etc/php84/conf.d/docker_custom.ini
# copy default nginx conf
COPY config/default-nginx /etc/nginx/sites-available/default
WORKDIR /etc/nginx/sites-enabled/
RUN ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
# Configure supervisord
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Add application
RUN rm -rf /var/www
RUN mkdir -p /var/www
WORKDIR /var/www
COPY src/ /var/www/
RUN rm -rf /var/cache/apk
RUN rm -rf /root/.composer/cache
EXPOSE 8080
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]