forked from fideloper/docker-mysql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (22 loc) · 905 Bytes
/
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
FROM phusion/baseimage:0.9.9
ENV HOME /root
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
CMD ["/sbin/my_init"]
# Some Environment Variables
ENV DEBIAN_FRONTEND noninteractive
# MySQL Installation
RUN apt-get update
RUN echo "mysql-server mysql-server/root_password password root" | debconf-set-selections
RUN echo "mysql-server mysql-server/root_password_again password root" | debconf-set-selections
RUN apt-get install -y mysql-server
ADD build/my.cnf /etc/mysql/my.cnf
RUN mkdir /etc/service/mysql
ADD build/mysql.sh /etc/service/mysql/run
RUN chmod +x /etc/service/mysql/run
RUN mkdir -p /var/lib/mysql/
RUN chmod -R 755 /var/lib/mysql/
ADD etc/my_init.d/99_mysql_setup.sh /etc/my_init.d/99_mysql_setup.sh
RUN chmod +x /etc/my_init.d/99_mysql_setup.sh
EXPOSE 3306
# END MySQL Installation
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*