-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.apache
87 lines (76 loc) · 2.37 KB
/
Dockerfile.apache
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
81
82
83
84
85
86
# To build:
#
# podman build -t partkeepr:latest .
# podman pod create --name partkeepr-pod -p 127.0.0.1:7155:80
# podman run --pod partkeepr-pod --name partkeepr-mariadb -v ./db:/var/lib/mysql -e MYSQL_RANDOM_ROOT_PASSWORD=yes -e MYSQL_DATABASE=partkeepr -e MYSQL_USER=partkeepr -e MYSQL_PASSWORD=partkeepr -d mariadb:10.0
# podman run --name partkeepr-web --pod partkeepr-pod -v ./data:/app/data/ -v ./config:/app/app/config -d localhost/partkeepr:latest
# podman exec -it partkeepr-web bash
## chown www-data:www-data -R /app/app/config
## chown www-data:www-data -R /app/data
#
# Open your.url/setup/
#
## cat /app/app/authkey.php
#
# podman exec -i partkeepr-mariadb mysql -upartkeepr -ppartkeepr partkeepr < database.sql
#
# Use 127.0.0.1 as MySQL host, not localhost!
#
FROM php:7.1-apache
ENV PARTKEEPR_VERSION 1.4.0
#install all the dependencies
RUN apk update && apk add --update-cache \
nginx \
nano \
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 && \
rm -rf /var/cache/apk/*
RUN 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 \
ldap \
gd \
intl \
bcmath \
mbstring \
mcrypt \
pcntl \
dom \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
zip \
opcache
#create project folder
ENV APP_HOME /app
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
#change uid and gid of apache to docker user uid/gid
RUN usermod -u 1000 www-data && groupmod -g 1000 www-data
#change apache setting
COPY copy/partkeepr-apache.conf /etc/apache2/sites-enabled/000-default.conf
RUN sed 's@;date.timezone [email protected] = 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
RUN a2enmod rewrite
#copy source files and change ownership
RUN cd $APP_HOME \
&& curl -sL https://downloads.partkeepr.org/partkeepr-${PARTKEEPR_VERSION}.tbz2 \
| tar --strip-components=1 -jxvf - && \
chown -R www-data:www-data $APP_HOME