-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile-dev
90 lines (68 loc) · 2.95 KB
/
Dockerfile-dev
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
87
88
89
90
FROM php:7.0-apache
# memcache, postfix and eventually apache should run in different containers.
RUN apt-get update &&\
apt-get install -y bzr libpng-dev libtidy-dev libicu-dev &&\
docker-php-ext-install -j$(nproc) gd tidy intl bcmath pdo_mysql opcache
RUN apt-get install -y uuid-dev &&\
pecl install uuid apcu &&\
docker-php-ext-enable uuid apcu
RUN pear install Text_Password
WORKDIR /usr/local/etc/php/conf.d/
RUN echo 'apc.enabled=1\n\
apc.write_lock=1\n\
apc.shm_size=100M\n\
apc.slam_defense=0\n\
apc.enable_cli=1\n'\
>> docker-php-ext-apcu.ini && cat docker-php-ext-apcu.ini
# php-memcached will not install, do this instead
RUN apt-get install -y libmemcached-dev zlib1g-dev \
&& pecl install memcached \
&& docker-php-ext-enable memcached
RUN echo 'opcache.memory_consumption=128M\n\
opcache.interned_strings_buffer=8\n\
opcache.max_accelerated_files=4000\n\
opcache.revalidate_freq=60\n\
opcache.fast_shutdown=1\n\
opcache.enable_cli=1\n'\
>> docker-php-ext-opcache.ini && cat docker-php-ext-opcache.ini
RUN a2enmod rewrite
WORKDIR /etc/apache2
RUN sed -i "s|Options Indexes FollowSymLinks|Options Indexes FollowSymLinks MultiViews|" apache2.conf && cat apache2.conf | grep Options
ARG MVER=4.3
ARG SOFT=ihris-manage
ARG TYPE=blank
ARG SITE=manage
ARG MCONFIG=iHRIS-Manage-BLANK.xml
RUN mkdir -p /var/lib/iHRIS/lib/$MVER
WORKDIR /var/lib/iHRIS/lib/$MVER
RUN bzr co --lightweight lp:i2ce/$MVER i2ce &&\
bzr co --lightweight lp:textlayout/$MVER textlayout &&\
bzr co --lightweight lp:ihris-common/$MVER ihris-common &&\
bzr co --lightweight lp:$SOFT/$MVER $SOFT
WORKDIR /var/lib/iHRIS/lib/$MVER/$SOFT/sites/$TYPE/pages
RUN cp htaccess.TEMPLATE .htaccess &&\
sed -i 's|RewriteBase /iHRIS|RewriteBase |' .htaccess &&\
sed -i 's|SetEnv I2CE_Rewritten On|SetEnv I2CE_Rewritten On\n SetEnv nocheck 1|' .htaccess &&\
cat .htaccess && [ -d local ] || mkdir local
RUN echo "<?php \n\
\$i2ce_site_i2ce_path = '/var/lib/iHRIS/lib/$MVER/i2ce' ;\n\
\$i2ce_site_dsn = getenv('DSN') ;\n\
\$i2ce_site_module_config = '/var/lib/iHRIS/lib/$MVER/$SOFT/sites/$TYPE/$MCONFIG' ;\n\
\$i2ce_site_user_access_init = null ;" >> local/config.values.php && cat local/config.values.php
WORKDIR /var/lib/iHRIS/lib/$MVER/$SOFT/sites/$TYPE
RUN printf ' <enable name="csd-data-address-type" />\n\
<enable name="csd_cache" />\n\
<enable name="csd-data-dow" />\n\
<enable name="csd-data-gender" />\n\
<enable name="csd-data-provider-status" />\n\
<enable name="csd-data-provider-data-model" />\n\
<enable name="IL-HWR" />\n\
<enable name="mHero" />\n\
<enable name="csd-search" />\n\
<enable name="CSD-data" />\n\
<enable name="ihris-manage-mcsd-update-supplier" />\n\
<enable name="PersonAttendance" />\n\
' >> enable.txt
RUN sed -i.bak '/<metadata>/r enable.txt' $MCONFIG
WORKDIR /var/www/html
RUN ln -s /var/lib/iHRIS/lib/$MVER/$SOFT/sites/$TYPE/pages $SITE