Created
February 5, 2014 03:45
-
-
Save mhamrah/8817129 to your computer and use it in GitHub Desktop.
Smple dockerfile for mysql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dockerfile my.cnf start.sh | |
vagrant@mesos:~/mysql$ more Dockerfile | |
FROM ubuntu:13.10 | |
RUN apt-get update | |
RUN apt-get -y upgrade | |
RUN apt-get install -y mysql-server | |
ADD /my.cnf /etc/mysql/conf.d/my.cnf | |
#VOLUME ["/var/lib/mysql"] | |
ADD start.sh start.sh | |
RUN /bin/sh start.sh | |
EXPOSE 3306 | |
CMD [ "/usr/sbin/mysqld" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
bind-addres=0.0.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/usr/sbin/mysqld & | |
sleep 5 | |
echo "GRANT ALL ON *.* TO root@'%' IDENTIFIED BY '' WITH GRANT OPTION; FLUSH PRIVILEGES" | mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment