Public Repository

Last pushed: 2 years ago
Short Description
MySQL daemon docker that exposes port 3306
Full Description

#docker daemon exposes port 3306 for and sets defalt username and password for mysql

#based on ubuntu14.04
FROM ubuntu:14.04
MAINTAINER Sandeep Kumar kkumar.sandeep89@gmail.com

#setting up default password
RUN echo "mysql-server-5.6 mysql-server/root_password password redhat" | debconf-set-selections
RUN echo "mysql-server-5.6 mysql-server/root_password_again password redhat" | debconf-set-selections

#installing mysql-server
RUN apt-get update && apt-get install -y mysql-server-5.6

#setting password
RUN service mysql start && \
sleep 5s && \
mysql -u root -predhat -e "GRANT ALL privileges ON . to 'root'@'%' identified by 'redhat'; FLUSH PRIVILEGES"

#adding in startup
RUN update-rc.d mysql defaults

#expose port for connection from web server
EXPOSE 3306

Docker Pull Command
Owner
vishwakarma09

Comments (1)
vishwakarma09
3 years ago