forked from dmitriitux/anilibria
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
56 lines (44 loc) · 1.36 KB
/
Copy pathDockerfile
File metadata and controls
56 lines (44 loc) · 1.36 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
56
FROM php:7.3.31-fpm-alpine3.13
USER root
WORKDIR /var/www/html
# Use the default development configuration
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# Install required dependencies
RUN \
apk --update add \
mc \
git \
nano \
nginx \
libzip-dev \
libxml2-dev \
supervisor \
mysql-client && \
docker-php-ext-install -j$(nproc) \
zip \
xml \
exif \
bcmath \
pdo_mysql
RUN \
apk add $PHPIZE_DEPS && \
pecl install -o -f redis && \
rm -rf /tmp/pear && \
docker-php-ext-enable redis
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && sync && \
install-php-extensions \
imagick
# Copy source code
COPY . .
# Copy supervisor config
COPY .docker/configs/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
# Copy nginx configurations
RUN mkdir -p /run/nginx
COPY .docker/configs/nginx/conf.d /etc/nginx/conf.d
COPY .docker/configs/nginx/nginx.conf /etc/nginx/nginx.conf
COPY .docker/configs/php-fpm/zz-custom-docker.conf /usr/local/etc/php-fpm.d/
# Cron
RUN crontab .docker/configs/cron/crontab
# Start supervisor
ENTRYPOINT ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]