-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
65 lines (44 loc) · 2.1 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
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y apache2 \
wget \
libapache2-mpm-itk \
vim \
memcached
RUN a2enmod rewrite
RUN a2enmod cgi
RUN a2enmod deflate
RUN a2enmod headers proxy_http
RUN cd /usr/sbin && sed -i 's@101@0@g' policy-rc.d
RUN echo deb http://debian.koha-community.org/koha oldstable main | tee /etc/apt/sources.list.d/koha.list
RUN wget -O- http://debian.koha-community.org/koha/gpg.asc | apt-key add -
RUN apt-get update && apt-get install -y koha-common
RUN cd /etc/koha && sed -i 's@INTRAPORT="80"@INTRAPORT="8080"@g' koha-sites.conf \
&& sed -i 's@DOMAIN=".myDNSname.org"@DOMAIN=""@g' koha-sites.conf
RUN cd /etc/koha && sed -i 's@OPACPORT="80"@OPACPORT="8081"@g' koha-sites.conf
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN cd /etc/apache2 \
&& echo "Listen 8080" >> ports.conf \
&& echo "Listen 8081" >> ports.conf
ADD koha-common.cnf /etc/mysql/
RUN cd /etc/mysql && koha-create --request-db --marcflavor unimarc koha
RUN koha-translate --install pt-PT
RUN koha-create --populate-db --marcflavor unimarc koha
ADD koha.conf /etc/apache2/sites-available/koha.conf
RUN sed -i "s@<memcached_servers></memcached_servers>@<memcached_servers>127.0.0.1:11211</memcached_servers>@g" /etc/koha/sites/koha/koha-conf.xml
RUN sed -i "s@<memcached_namespace></memcached_namespace>@<memcached_namespace>koha</memcached_namespace>@g" /etc/koha/sites/koha/koha-conf.xml
RUN sed -i "s@<enable_plugins>0</enable_plugins>@<enable_plugins>1</enable_plugins>@g" /etc/koha/sites/koha/koha-conf.xml
RUN chown -R koha-koha:koha-koha /etc/koha/sites/koha/
RUN chown -R koha-koha:koha-koha /var/lib/koha/koha/
ENV TERM xterm
ENV PERL5LIB /usr/share/koha/lib/
ENV KOHA_CONF /etc/koha/sites/koha/koha-conf.xml
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_USER_UID www-data
COPY start.sh /start.sh
CMD ["/bin/bash", "/start.sh"]