This repository has been archived by the owner on Dec 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
68 lines (64 loc) · 1.85 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
FROM php:7.1-fpm-alpine
LABEL maintainer="Maksim Stojkovic <docker@maksimstojkovic.com>"
LABEL org.opencontainers.image.source https://github.com/maksimstojkovic/docker-partkeepr
ENV PARTKEEPR_VERSION=1.4.0 APP_HOME=/partkeepr
WORKDIR $APP_HOME
RUN \
apk update && \
apk add --no-cache \
nginx \
nano \
sudo \
zip \
unzip \
libpng-dev \
libmcrypt-dev \
libpq \
zlib-dev \
icu-dev \
curl-dev \
gnutls-dev \
libxml2-dev \
postgresql-dev \
ldb-dev \
openldap-dev \
freetype-dev \
jpeg-dev \
libjpeg \
libldap && \
\
docker-php-ext-configure ldap && \
docker-php-ext-configure bcmath && \
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --enable-gd-native-ttf && \
docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd && \
docker-php-ext-install -j "$(nproc)" \
ldap \
gd \
intl \
bcmath \
mbstring \
mcrypt \
pcntl \
dom \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
zip \
opcache && \
\
mkdir -p $APP_HOME /run/nginx/ && \
sed -E \
's|;date.timezone =|date.timezone = UTC|; \
s|max_execution_time = .*|max_execution_time = 72000|; \
s|memory_limit = .*|memory_limit = 512M|' \
/usr/local/etc/php/php.ini-production > /usr/local/etc/php/php.ini && \
curl \
-o /tmp/partkeepr.tbz2 \
-L https://downloads.partkeepr.org/partkeepr-${PARTKEEPR_VERSION}.tbz2 && \
chown -R www-data:www-data $APP_HOME /tmp/partkeepr.tbz2
COPY config/nginx.conf /etc/nginx/conf.d/default.conf
COPY config/crontab /etc/partkeepr.cron
COPY php /usr/local/etc/php
COPY scripts /usr/local/bin
EXPOSE 80