Skip to content

Instantly share code, notes, and snippets.

@zba
Created July 28, 2014 01:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zba/27d9e54e7293c1bb2da4 to your computer and use it in GitHub Desktop.
Save zba/27d9e54e7293c1bb2da4 to your computer and use it in GitHub Desktop.
mysql docker
FROM centos:centos6
#FROM ubuntu
RUN yum install -y mysql-server
ADD mysql-entry.pl /entrypoint.pl
ENTRYPOINT ["/entrypoint.pl"]
CMD ["/bin/bash"]
#!/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