@KendrickColeman
Slideware courtesy of Docker
docker pull <image name>
docker commit <container id> user/image
docker push user/image
docker run -d --name docker_mysql -p 3306:3306 -e MYSQL_PASS="87654321" tutum/mysql
docker run --name docker_wordpress01 --link docker_mysql:mysql -e WORDPRESS_DB_USER="admin" -e WORDPRESS_DB_PASSWORD="87654321" -e WORDPRESS_DB_NAME="docker_wordpress01" -p 8080:
80 -d wordpress
FROM ubuntu:trusty MAINTAINER Fernando Mayo <fernando@tutum.co>, Feng Honglin <hfeng@tutum.co> # Install packages RUN apt-get update RUN DEBIAN_FRONTEND=noninteractive apt-get -y install mysql-server-5.6 pwgen # Remove pre-installed database RUN rm -rf /var/lib/mysql/* # Add MySQL configuration ADD my.cnf /etc/mysql/conf.d/my.cnf ADD mysqld_charset.cnf /etc/mysql/conf.d/mysqld_charset.cnf # Add MySQL scripts ADD create_mysql_admin_user.sh /create_mysql_admin_user.sh ADD import_sql.sh /import_sql.sh ADD run.sh /run.sh RUN chmod 755 /*.sh # Exposed ENV ENV MYSQL_PASS **Random** # Add VOLUMEs to allow backup of config and databases VOLUME ["/etc/mysql", "/var/lib/mysql"] EXPOSE 3306 CMD ["/run.sh"]
DOCKER CONTAINER HOSTING
DOCKER SERVICE DISCOVERY
LINUX ENGINEERED FOR DOCKER
Docker images used:
Ubuntu (official): https://registry.hub.docker.com/_/ubuntu/
WordPress (official): https://registry.hub.docker.com/_/wordpress/
MySQL (tutum): https://registry.hub.docker.com/u/tutum/mysql/
THANK YOU!
@KendrickColeman
www.kendrickcoleman.com