-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (30 loc) · 897 Bytes
/
Copy pathDockerfile
File metadata and controls
41 lines (30 loc) · 897 Bytes
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
# Mysql
#
# VERSION 0.3
FROM allisson/docker-ubuntu:latest
MAINTAINER Allisson Azevedo <allisson@gmail.com>
# avoid debconf and initrd
ENV DEBIAN_FRONTEND noninteractive
ENV INITRD No
# install packages
RUN apt-get update
RUN apt-get install -y openssh-server mysql-server supervisor
# make /var/run/sshd
RUN mkdir /var/run/sshd
# setup mysql
RUN sed -i -e"s/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/my.cnf
ADD set-mysql-password.sh /tmp/set-mysql-password.sh
RUN /bin/sh /tmp/set-mysql-password.sh
# set root password
RUN echo "root:root" | chpasswd
# clean packages
RUN apt-get clean
RUN rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
# expose mysql port
EXPOSE 22 3306
# volumes
VOLUME ["/var/lib/mysql"]
# copy supervisor conf
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# start supervisor
CMD ["/usr/bin/supervisord"]