forked from weserv/images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (39 loc) · 1.52 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
FROM centos:7
MAINTAINER Kleis Auke Wolthuizen <info@kleisauke.nl>
# Set default timezone.
# An alternative way to set timezone is to run container with: -e "TZ=Continent/City".
ENV TZ Europe/Amsterdam
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install PHP, PHP extensions, composer, redis, supervisor and nginx
RUN yum update -y && \
yum install -y epel-release yum-utils && \
yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm && \
yum-config-manager --enable remi-php71 && \
yum install -y \
composer \
nginx \
php \
php-fpm \
php-gd \
php-intl \
php-opcache \
php-pecl-redis \
php-pecl-vips \
redis \
supervisor && \
yum clean all
# Add nginx configurations
ADD config/nginx.conf /etc/nginx/nginx.conf
ADD config/imagesweserv.nginxconf /etc/nginx/sites-available/default.conf
RUN mkdir /etc/nginx/sites-enabled \
&& ln -s /etc/nginx/sites-available/default.conf /etc/nginx/sites-enabled/default.conf
# Add PHP configurations
ADD config/php.ini /etc/php.ini
ADD config/www.conf /etc/php-fpm.d/www.conf
# Add Supervisor configuration
ADD config/supervisord.conf /etc/supervisord.conf
WORKDIR /var/www/imagesweserv
# Define mountable directories
VOLUME ["/var/www/imagesweserv", "/var/log/supervisor", "/dev/shm"]
EXPOSE 80
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisord.conf"]