From d24ddc9a074d28dc5749d78cfb0bebca72c4a967 Mon Sep 17 00:00:00 2001 From: Vinu_DevOps <44870110+VinothKumar-DevOps@users.noreply.github.com> Date: Thu, 24 Oct 2019 10:32:01 +0530 Subject: [PATCH 1/2] Update mysql-setup.sh --- mysql-server/mysql-setup.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/mysql-server/mysql-setup.sh b/mysql-server/mysql-setup.sh index c9403b8..e07b4a3 100644 --- a/mysql-server/mysql-setup.sh +++ b/mysql-server/mysql-setup.sh @@ -1,6 +1,32 @@ #!/bin/sh # Keep upstart from complaining + + +FROM ubuntu:bionic-20190612 + +LABEL maintainer="sameer@damagehead.com" + +ENV MYSQL_USER=mysql \ + MYSQL_VERSION=5.7.26 \ + MYSQL_DATA_DIR=/var/lib/mysql \ + MYSQL_RUN_DIR=/run/mysqld \ + MYSQL_LOG_DIR=/var/log/mysql + +RUN apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y mysql-server=${MYSQL_VERSION}* \ + && rm -rf ${MYSQL_DATA_DIR} \ + && rm -rf /var/lib/apt/lists/* + +COPY entrypoint.sh /sbin/entrypoint.sh + +RUN chmod 755 /sbin/entrypoint.sh + +EXPOSE 3306/tcp + +ENTRYPOINT ["/sbin/entrypoint.sh"] + +CMD ["/usr/bin/mysqld_safe"] RUN dpkg-divert --local --rename --add /sbin/initctl RUN ln -s /bin/true /sbin/initctl @@ -10,4 +36,4 @@ sed -i -e"s/^bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/my /usr/sbin/mysqld & sleep 5 -echo "GRANT ALL ON *.* TO admin@'%' IDENTIFIED BY 'mysql-server' WITH GRANT OPTION; FLUSH PRIVILEGES" | mysql \ No newline at end of file +echo "GRANT ALL ON *.* TO admin@'%' IDENTIFIED BY 'mysql-server' WITH GRANT OPTION; FLUSH PRIVILEGES" | mysql From 4e3c9436b588532758de094c55624057e0f85d9d Mon Sep 17 00:00:00 2001 From: Vinu_DevOps <44870110+VinothKumar-DevOps@users.noreply.github.com> Date: Thu, 24 Oct 2019 10:34:48 +0530 Subject: [PATCH 2/2] Update Dockerfile --- apache-php/Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/apache-php/Dockerfile b/apache-php/Dockerfile index f110aab..0497b10 100644 --- a/apache-php/Dockerfile +++ b/apache-php/Dockerfile @@ -4,6 +4,14 @@ FROM kstaken/apache2 MAINTAINER Kimbro Staken version: 0.1 -RUN apt-get update && apt-get install -y php5 libapache2-mod-php5 php5-mysql php5-cli && apt-get clean && rm -rf /var/lib/apt/lists/* +#Code from VinothKumar for PHp extentions installation 7 Configure -CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"] +RUN apt-get update && apt-get install -y \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libpng-dev \ + && docker-php-ext-install -j$(nproc) iconv \ + && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ + && docker-php-ext-install -j$(nproc) gd + + CMD ["/usr/sbin/apache2", "-D", "FOREGROUND"]