-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
48 lines (36 loc) · 1.64 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
FROM nimmis/apache-php5
MAINTAINER Sutrisno Hadi <[email protected]>
ADD docker-mariadb/10.0/bin/mysql_postinit.sh /usr/local/bin/
ADD docker-mariadb/10.0/bin/mysql_setrootpassword /usr/local/bin/
ADD docker-mariadb/10.0/bin/mysql_setup_database.sh /usr/local/bin/
ADD docker-mariadb/10.0/bin/mysql_user_postinit.sh /usr/local/bin/
ADD docker-mariadb/10.0/bin/mysql_user_preinit.sh /usr/local/bin/
ADD docker-mariadb/10.0/bin/init.sh /usr/local/bin/
ADD docker-mariadb/10.0/supervisor/mariadb.conf /etc/supervisor/conf.d/
# Override default mirror to http://buaya.klas.or.id/ubuntu/
# comment out this line if you want to use default mirror
ADD trusty/sources.list /etc/apt/sources.list
# Create required directories
RUN mkdir /docker-entrypoint-initdb.d
# Update repositories & install packages
RUN apt-get update && \
apt-get install software-properties-common && \
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db && \
add-apt-repository 'deb http://ftp.ddg.lth.se/mariadb/repo/10.0/ubuntu trusty main' && \
apt-get update && \
apt-get install -y --no-install-recommends mariadb-server && \
apt-get clean all && \
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf && \
chown mysql /etc/mysql/debian.cnf && \
chmod +x /usr/local/bin/*
VOLUME /var/lib/mysql
EXPOSE 3306
# Add webutils & default index.php
ADD www-html /var/www/html
# override virtual host config to enable htaccess
ADD conf/apache2.conf /etc/apache2/apache2.conf
ADD conf/000-default.conf /etc/apache2/sites-available/000-default.conf
# Enable mod_rewrite
RUN a2enmod rewrite
# Restart Apache
RUN service apache2 restart