Created
July 28, 2014 01:36
-
-
Save zba/27d9e54e7293c1bb2da4 to your computer and use it in GitHub Desktop.
mysql docker
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
FROM centos:centos6 | |
#FROM ubuntu | |
RUN yum install -y mysql-server | |
ADD mysql-entry.pl /entrypoint.pl | |
ENTRYPOINT ["/entrypoint.pl"] | |
CMD ["/bin/bash"] |
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
#!/usr/bin/perl | |
print "Starting\n"; | |
system "service mysqld start"; | |
$SIG{TERM} = sub { | |
system "service mysqld stop"; | |
die "Exiting\n"; | |
}; | |
system "/bin/bash"; | |
system "service mysqld stop"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment