Skip to content

Instantly share code, notes, and snippets.

@mhamrah
Created February 5, 2014 03:45
Show Gist options
  • Save mhamrah/8817129 to your computer and use it in GitHub Desktop.
Save mhamrah/8817129 to your computer and use it in GitHub Desktop.
Smple dockerfile for mysql
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" ]
[mysqld]
bind-addres=0.0.0.0
#!/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