From a229080587ffffdc9135d88b701ea3308f82491a Mon Sep 17 00:00:00 2001 From: Jensen Sun Date: Tue, 4 Dec 2018 18:02:03 -0500 Subject: [PATCH] remove useless docker files, keep directory clean --- docker/Dockerfile | 39 --------------------------------------- docker/README.md | 13 ------------- docker/db/Dockerfile | 11 ----------- docker/mysql-setup.sh | 1 - docker/mysql-user.sh | 34 ---------------------------------- docker/run.sh | 5 ----- docker/tomcat/Dockerfile | 5 ----- 7 files changed, 108 deletions(-) delete mode 100644 docker/Dockerfile delete mode 100644 docker/README.md delete mode 100644 docker/db/Dockerfile delete mode 100644 docker/mysql-setup.sh delete mode 100644 docker/mysql-user.sh delete mode 100644 docker/run.sh delete mode 100644 docker/tomcat/Dockerfile diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 2abea8187..000000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM tomcat:8.5.35-jre8 -MAINTAINER Ziheng Sun - - -# Prepare the installation of mysql-server and tomcat 7 - -# Install packages -RUN apt-get update && \ - apt-get -y install mysql-server && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -# Add image configuration and scripts -# ADD start-tomcat.sh /start-tomcat.sh -# ADD start-mysqld.sh /start-mysqld.sh -ADD run.sh /run.sh -RUN chmod 755 /*.sh -# ADD my.cnf /etc/mysql/conf.d/my.cnf -# RUN chmod 644 /etc/mysql/conf.d/my.cnf -Add gw.sql /gw.sql -# ADD supervisord-tomcat.conf /etc/supervisor/conf.d/supervisord-tomcat.conf -# ADD supervisord-mysqld.conf /etc/supervisor/conf.d/supervisord-mysqld.conf - -# Remove pre-installed database -# RUN rm -rf /var/lib/mysql/* - -# Add MySQL utils -ADD mysql-user.sh /mysql-user.sh -ADD mysql-setup.sh /mysql-setup.sh -RUN chmod 755 /*.sh - -WORKDIR /usr/local/tomcat - -# Add volumes for MySQL -# VOLUME ["/etc/mysql", "/var/lib/mysql"] - -EXPOSE 8080 - -ENTRYPOINT "/run.sh && /usr/local/tomcat/bin/catalina.sh run" diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index f92bb7633..000000000 --- a/docker/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# dmulligan/docker-example-tomcat-mysql - -A docker compose example project with a MySQL and a Tomcat container linked together. - -To run: - - $ docker-compose up - -Containers: -- MySQL: on startup, the container executes a simple database initialisation script `./db/mysql-init.sql`, which - creates a database containing a single table which is populated with a few records. -- Tomcat: a simple web application, located within `./tomcat/webapps`, is deployed. The application contains some JSPs - to test the database link between the Tomcat and the MySQL containers. diff --git a/docker/db/Dockerfile b/docker/db/Dockerfile deleted file mode 100644 index f306c90c7..000000000 --- a/docker/db/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM mysql -MAINTAINER (Ziheng Sun) - -ENV MYSQL_ROOT_PASSWORD aA123456789 - -# Copy SQL to mysql initialization folder -ADD gw.sql /docker-entrypoint-initdb.d/ - -#PORT -#EXPOSE 3306 - diff --git a/docker/mysql-setup.sh b/docker/mysql-setup.sh deleted file mode 100644 index ef035690e..000000000 --- a/docker/mysql-setup.sh +++ /dev/null @@ -1 +0,0 @@ -mysql -uadmin -ptest1 -e 'CREATE DATABASE foo CHARACTER SET UTF8' diff --git a/docker/mysql-user.sh b/docker/mysql-user.sh deleted file mode 100644 index 617955bd0..000000000 --- a/docker/mysql-user.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -mkdir -p /var/run/mysqld -chown mysql:mysql /var/run/mysqld - -/usr/bin/mysqld_safe > /dev/null 2>&1 & - -RET=1 -#while [[ RET -ne 0 ]]; do - echo "=> Waiting for confirmation of MySQL service startup" - sleep 5 - mysql -uroot -e "status" > /dev/null 2>&1 - RET=$? -#done - -#PASS=${MYSQL_PASS:-$(pwgen -s 12 1)} -#_word=$( [ ${MYSQL_PASS} ] && echo "preset" || echo "random" ) -#echo "=> Creating MySQL admin user with ${_word} password" - -mysql -uroot -e "CREATE USER 'admin'@'%' IDENTIFIED BY 'test1'" -mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION" - -echo "=> Done!" - -echo "========================================================================" -echo "You can now connect to this MySQL Server using:" -echo "" -echo " mysql -uadmin -p$PASS -h -P" -echo "" -echo "Please remember to change the above password as soon as possible!" -echo "MySQL user 'root' has no password but only allows local connections" -echo "========================================================================" - -mysqladmin -uroot shutdown diff --git a/docker/run.sh b/docker/run.sh deleted file mode 100644 index 4e362947d..000000000 --- a/docker/run.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -/mysql-user.sh - -/mysql-setup.sh diff --git a/docker/tomcat/Dockerfile b/docker/tomcat/Dockerfile deleted file mode 100644 index 5f6262e96..000000000 --- a/docker/tomcat/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM tomcat -MAINTAINER Ziheng Sun - - -COPY /1.0-SNAPSHOT/my-app-1.0-SNAPSHOT.war /usr/local/tomcat/webapps/myapp.war \ No newline at end of file