Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit faa6335

Browse files
author
Antonios Papadakis
committed
Add MySQL 5.6 and 5.7 Support
macOS
1 parent 40fbee8 commit faa6335

File tree

41 files changed

+956
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+956
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM mysql:8.0.21
2+
ENV MYSQL_DATABASE=default MYSQL_ROOT_PASSWORD=root MYSQL_USER=default MYSQL_PASSWORD=defaultpassword
3+
EXPOSE 3306 33060
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM php:7.2.33-apache
2+
RUN apt-get update && apt-get install --no-install-recommends -y && apt-get install openssl curl zlib1g-dev enchant libsodium-dev libzip-dev bzip2 libcurl4-openssl-dev libssl-dev libpng-dev libgmp-dev libxml2-dev libenchant-dev libc-client2007e-dev libc-client-dev libkrb5-dev libonig-dev libedit-dev libtidy-dev libxslt-dev --no-install-recommends -y && rm -rf /var/lib/apt/lists/*
3+
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl && docker-php-ext-configure zip --with-libzip
4+
RUN docker-php-ext-install bcmath calendar ctype curl enchant exif ftp gmp iconv imap intl mbstring pcntl pdo pdo_mysql readline shmop soap sockets sodium sysvmsg sysvsem sysvshm tidy tokenizer xsl zip -j$(nproc)
5+
RUN ls /usr/local/lib/php/extensions/no-debug-non-zts-20170718/
6+
RUN apt-get purge openssl curl zlib1g-dev enchant libsodium-dev libzip-dev bzip2 libcurl4-openssl-dev libssl-dev libpng-dev libgmp-dev libxml2-dev libenchant-dev libc-client2007e-dev libc-client-dev libkrb5-dev libonig-dev libedit-dev libtidy-dev libxslt-dev -y
7+
EXPOSE 80 443
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
3+
NC='\033[0m' # No Color
4+
YELLOW='\033[1;33m'
5+
RED='\033[1;31m'
6+
7+
function SQLSetup() {
8+
read -p 'Where would you like your MySQL server files to reside on your local machine (absolute path, must exist)? ' MYSQLFOLDERLOCATION
9+
ls "$MYSQLFOLDERLOCATION"
10+
ISMYSQLFOLDERPRESENT=$?
11+
if [ -z "$MYSQLFOLDERLOCATION" ]; then
12+
echo -e "${YELLOW}The path of the MySQL file folder cannot be empty. Please choose a folder.${NC}"
13+
SQLSetup
14+
elif [ "$ISMYSQLFOLDERPRESENT" = 1 ]; then
15+
echo -e "$MYSQLFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
16+
SQLSetup
17+
fi
18+
}
19+
function PHPSetup() {
20+
read -p 'Where would you like your PHP website files to reside on your local machine (absolute path, must exist)? ' APACHEFOLDERLOCATION
21+
ls "$APACHEFOLDERLOCATION"
22+
ISAPACHEFOLDERPRESENT=$?
23+
if [ -z "$APACHEFOLDERLOCATION" ]; then
24+
echo -e "${YELLOW}The path of the PHP website files folder cannot be empty. Please choose a folder.${NC}"
25+
PHPSetup
26+
elif [ "$ISAPACHEFOLDERPRESENT" = 1 ]; then
27+
echo -e "$APACHEFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
28+
PHPSetup
29+
fi
30+
}
31+
32+
SQLSetup
33+
PHPSetup
34+
35+
if [ ! "$(docker ps -q -f name=php72)" ]; then
36+
if [ "$(docker ps -aq -f status=exited -f name=php72)" ]; then
37+
# cleanup
38+
docker rm php72
39+
fi
40+
# run your container
41+
docker run -d -p 80:80 -p 443:443 --volume "$APACHEFOLDERLOCATION":/var/www/html/ --name php72 frostedflakez/php-mysql-webserver:0.9-beta.3-php-latest-7.2
42+
fi
43+
44+
if [ ! "$(docker ps -q -f name=mysql56)" ]; then
45+
if [ "$(docker ps -aq -f status=exited -f name=mysql56)" ]; then
46+
# cleanup
47+
docker rm mysql56
48+
fi
49+
# run your container
50+
docker run -d -p 3306:3306 -p 33060:33060 --volume "$MYSQLFOLDERLOCATION":/var/lib/mysql --name mysql56 frostedflakez/php-mysql-webserver:0.9-beta.3-mysql-latest-5.6
51+
fi
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
NC='\033[0m' # No Color
4+
YELLOW='\033[1;33m'
5+
RED='\033[1;31m'
6+
7+
function SQLSetup() {
8+
read -p 'Where would you like your MySQL server files to reside on your local machine (absolute path, must exist)? ' MYSQLFOLDERLOCATION
9+
ls "$MYSQLFOLDERLOCATION"
10+
ISMYSQLFOLDERPRESENT=$?
11+
if [ -z "$MYSQLFOLDERLOCATION" ]; then
12+
echo -e "${YELLOW}The path of the MySQL file folder cannot be empty. Please choose a folder.${NC}"
13+
SQLSetup
14+
elif [ "$ISMYSQLFOLDERPRESENT" = 1 ]; then
15+
echo -e "$MYSQLFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
16+
SQLSetup
17+
fi
18+
}
19+
20+
SQLSetup
21+
22+
if [ ! "$(docker ps -q -f name=mysql56)" ]; then
23+
if [ "$(docker ps -aq -f status=exited -f name=mysql56)" ]; then
24+
# cleanup
25+
docker rm mysql56
26+
fi
27+
# run your container
28+
docker run -d -p 3306:3306 -p 33060:33060 --volume "$MYSQLFOLDERLOCATION":/var/lib/mysql --name mysql56 frostedflakez/php-mysql-webserver:0.9-beta.3-mysql-latest-5.6
29+
fi
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
NC='\033[0m' # No Color
4+
YELLOW='\033[1;33m'
5+
RED='\033[1;31m'
6+
7+
function PHPSetup() {
8+
read -p 'Where would you like your PHP website files to reside on your local machine (absolute path, must exist)? ' APACHEFOLDERLOCATION
9+
ls "$APACHEFOLDERLOCATION"
10+
ISAPACHEFOLDERPRESENT=$?
11+
if [ "$APACHEFOLDERLOCATION" = : ]; then
12+
echo -e "${YELLOW}The path of the PHP website files folder cannot be empty. Please choose a folder.${NC}"
13+
PHPSetup
14+
elif [ "$ISAPACHEFOLDERPRESENT" = 1 ]; then
15+
echo -e "$APACHEFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
16+
PHPSetup
17+
fi
18+
}
19+
20+
PHPSetup
21+
22+
if [ ! "$(docker ps -q -f name=php72)" ]; then
23+
if [ "$(docker ps -aq -f status=exited -f name=php72)" ]; then
24+
# cleanup
25+
docker rm php72
26+
fi
27+
# run your container
28+
docker run -d -p 80:80 -p 443:443 --volume "$APACHEFOLDERLOCATION":/var/www/html/ --name php72 frostedflakez/php-mysql-webserver:0.9-beta.3-php-latest-7.2
29+
fi
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM mysql:8.0.21
2+
ENV MYSQL_DATABASE=default MYSQL_ROOT_PASSWORD=root MYSQL_USER=default MYSQL_PASSWORD=defaultpassword
3+
EXPOSE 3306 33060
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM php:7.3.22-apache
2+
RUN apt-get update && apt-get install --no-install-recommends -y && apt-get install openssl curl zlib1g-dev enchant libsodium-dev libzip-dev bzip2 libcurl4-openssl-dev libssl-dev libpng-dev libgmp-dev libxml2-dev libenchant-dev libc-client2007e-dev libc-client-dev libkrb5-dev libonig-dev libedit-dev libtidy-dev libxslt-dev --no-install-recommends -y && rm -rf /var/lib/apt/lists/*
3+
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl
4+
RUN docker-php-ext-install bcmath calendar ctype curl enchant exif ftp gmp iconv imap intl mbstring pcntl pdo pdo_mysql readline shmop soap sockets sodium sysvmsg sysvsem sysvshm tidy tokenizer xsl zip -j$(nproc)
5+
RUN ls /usr/local/lib/php/extensions/no-debug-non-zts-20180731/
6+
RUN apt-get purge openssl curl zlib1g-dev enchant libsodium-dev libzip-dev bzip2 libcurl4-openssl-dev libssl-dev libpng-dev libgmp-dev libxml2-dev libenchant-dev libc-client2007e-dev libc-client-dev libkrb5-dev libonig-dev libedit-dev libtidy-dev libxslt-dev -y
7+
EXPOSE 80 443
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
3+
NC='\033[0m' # No Color
4+
YELLOW='\033[1;33m'
5+
RED='\033[1;31m'
6+
7+
function SQLSetup() {
8+
read -p 'Where would you like your MySQL server files to reside on your local machine (absolute path, must exist)? ' MYSQLFOLDERLOCATION
9+
ls "$MYSQLFOLDERLOCATION"
10+
ISMYSQLFOLDERPRESENT=$?
11+
if [ -z "$MYSQLFOLDERLOCATION" ]; then
12+
echo -e "${YELLOW}The path of the MySQL file folder cannot be empty. Please choose a folder.${NC}"
13+
SQLSetup
14+
elif [ "$ISMYSQLFOLDERPRESENT" = 1 ]; then
15+
echo -e "$MYSQLFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
16+
SQLSetup
17+
fi
18+
}
19+
function PHPSetup() {
20+
read -p 'Where would you like your PHP website files to reside on your local machine (absolute path, must exist)? ' APACHEFOLDERLOCATION
21+
ls "$APACHEFOLDERLOCATION"
22+
ISAPACHEFOLDERPRESENT=$?
23+
if [ -z "$APACHEFOLDERLOCATION" ]; then
24+
echo -e "${YELLOW}The path of the PHP website files folder cannot be empty. Please choose a folder.${NC}"
25+
PHPSetup
26+
elif [ "$ISAPACHEFOLDERPRESENT" = 1 ]; then
27+
echo -e "$APACHEFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
28+
PHPSetup
29+
fi
30+
}
31+
32+
SQLSetup
33+
PHPSetup
34+
35+
if [ ! "$(docker ps -q -f name=php73)" ]; then
36+
if [ "$(docker ps -aq -f status=exited -f name=php73)" ]; then
37+
# cleanup
38+
docker rm php73
39+
fi
40+
# run your container
41+
docker run -d -p 80:80 -p 443:443 --volume "$APACHEFOLDERLOCATION":/var/www/html/ --name php73 frostedflakez/php-mysql-webserver:0.9-beta.3-php-latest-7.3
42+
fi
43+
44+
if [ ! "$(docker ps -q -f name=mysql56)" ]; then
45+
if [ "$(docker ps -aq -f status=exited -f name=mysql56)" ]; then
46+
# cleanup
47+
docker rm mysql56
48+
fi
49+
# run your container
50+
docker run -d -p 3306:3306 -p 33060:33060 --volume "$MYSQLFOLDERLOCATION":/var/lib/mysql --name mysql56 frostedflakez/php-mysql-webserver:0.9-beta.3-mysql-latest-5.6
51+
fi
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
NC='\033[0m' # No Color
4+
YELLOW='\033[1;33m'
5+
RED='\033[1;31m'
6+
7+
function SQLSetup() {
8+
read -p 'Where would you like your MySQL server files to reside on your local machine (absolute path, must exist)? ' MYSQLFOLDERLOCATION
9+
ls "$MYSQLFOLDERLOCATION"
10+
ISMYSQLFOLDERPRESENT=$?
11+
if [ -z "$MYSQLFOLDERLOCATION" ]; then
12+
echo -e "${YELLOW}The path of the MySQL file folder cannot be empty. Please choose a folder.${NC}"
13+
SQLSetup
14+
elif [ "$ISMYSQLFOLDERPRESENT" = 1 ]; then
15+
echo -e "$MYSQLFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
16+
SQLSetup
17+
fi
18+
}
19+
20+
SQLSetup
21+
22+
if [ ! "$(docker ps -q -f name=mysql56)" ]; then
23+
if [ "$(docker ps -aq -f status=exited -f name=mysql56)" ]; then
24+
# cleanup
25+
docker rm mysql56
26+
fi
27+
# run your container
28+
docker run -d -p 3306:3306 -p 33060:33060 --volume "$MYSQLFOLDERLOCATION":/var/lib/mysql --name mysql56 frostedflakez/php-mysql-webserver:0.9-beta.3-mysql-latest-5.6
29+
fi
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
NC='\033[0m' # No Color
4+
YELLOW='\033[1;33m'
5+
RED='\033[1;31m'
6+
7+
function PHPSetup() {
8+
read -p 'Where would you like your PHP website files to reside on your local machine (absolute path, must exist)? ' APACHEFOLDERLOCATION
9+
ls "$APACHEFOLDERLOCATION"
10+
ISAPACHEFOLDERPRESENT=$?
11+
if [ -z "$APACHEFOLDERLOCATION" ]; then
12+
echo -e "${YELLOW}The path of the PHP website files folder cannot be empty. Please choose a folder.${NC}"
13+
PHPSetup
14+
elif [ "$ISAPACHEFOLDERPRESENT" = 1 ]; then
15+
echo -e "$APACHEFOLDERLOCATION" ${RED}does not exist, please choose another folder.${NC}
16+
PHPSetup
17+
fi
18+
}
19+
20+
PHPSetup
21+
22+
if [ ! "$(docker ps -q -f name=php73)" ]; then
23+
if [ "$(docker ps -aq -f status=exited -f name=php73)" ]; then
24+
# cleanup
25+
docker rm php73
26+
fi
27+
# run your container
28+
docker run -d -p 80:80 -p 443:443 --volume "$APACHEFOLDERLOCATION":/var/www/html/ --name php73 frostedflakez/php-mysql-webserver:0.9-beta.3-php-latest-7.3
29+
fi

0 commit comments

Comments
 (0)