This package contains mysql-server on ubuntu:14.04

Source: Internet
Author: User

"How To Build"
Cd/home/ops/work/demo/docker/aws/mysql
Touch Dockerfile
Docker build-t aws_mysql_image:v1.0.

"Test"
Docker run-id-p 8888:3306--name Aws_mysql_container Aws_mysql_image:v1.0/bin/bash
Docker exec-it Aws_mysql_container/bin/bash
Service MySQL Start
Mysql-h Localhost-uroot-padminadmin

"Dockerfile"
From ubuntu:14.04
Maintainer jbding <[email protected]>
RUN apt-get Update
RUN Apt-get install-y Mysql-server

Run/etc/init.d/mysql start \
&& MYSQL-UROOT-E "Grant all privileges on * * to ' root ' @ '% ' identified by ' root ';" \
&& MYSQL-UROOT-E "Grant all privileges on *. * to ' root ' @ ' localhost ' identified by ' root ';"

RUN Sed-ei ' s/^ (bind-address|log)/#&/'/etc/mysql/my.cnf \
&& echo ' Skip-host-cache\nskip-name-resolve ' | awk ' {print} ' = = ' [mysqld] ' && c = = 0 {c = 1; System ("Cat")} '/etc/mysql/my.cnf >/TMP/MY.CNF \
&& mv/tmp/my.cnf/etc/mysql/my.cnf

EXPOSE 3306
CMD ["/usr/bin/mysqld_safe"]

This package contains mysql-server on ubuntu:14.04

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.