This repository was archived by the owner on May 5, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +116
-0
lines changed
macos/Docker/dockerFiles/mysql-8.0 Expand file tree Collapse file tree 4 files changed +116
-0
lines changed Original file line number Diff line number Diff line change 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=mysql80) " ]; then
23+ if [ " $( docker ps -aq -f status=exited -f name=mysql80) " ]; then
24+ # cleanup
25+ docker rm mysql80
26+ fi
27+ # run your container
28+ docker run -d -p 3306:3306 -p 33060:33060 --volume " $MYSQLFOLDERLOCATION " :/var/lib/mysql --name mysql80 frostedflakez/php-mysql-webserver:0.9-beta.3-mysql-latest-8.0
29+ fi
Original file line number Diff line number Diff line change 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=mysql80) " ]; then
23+ if [ " $( docker ps -aq -f status=exited -f name=mysql80) " ]; then
24+ # cleanup
25+ docker rm mysql80
26+ fi
27+ # run your container
28+ docker run -d -p 3306:3306 -p 33060:33060 --volume " $MYSQLFOLDERLOCATION " :/var/lib/mysql --name mysql80 frostedflakez/php-mysql-webserver:0.9-beta.3-mysql-latest-8.0
29+ fi
Original file line number Diff line number Diff line change 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=mysql80) " ]; then
23+ if [ " $( docker ps -aq -f status=exited -f name=mysql80) " ]; then
24+ # cleanup
25+ docker rm mysql80
26+ fi
27+ # run your container
28+ docker run -d -p 3306:3306 -p 33060:33060 --volume " $MYSQLFOLDERLOCATION " :/var/lib/mysql --name mysql80 frostedflakez/php-mysql-webserver:0.9-beta.3-mysql-latest-8.0
29+ fi
Original file line number Diff line number Diff line change 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=mysql80) " ]; then
23+ if [ " $( docker ps -aq -f status=exited -f name=mysql80) " ]; then
24+ # cleanup
25+ docker rm mysql80
26+ fi
27+ # run your container
28+ docker run -d -p 3306:3306 -p 33060:33060 --volume " $MYSQLFOLDERLOCATION " :/var/lib/mysql --name mysql80 frostedflakez/php-mysql-webserver:0.9-beta.3-mysql-latest-8.0
29+ fi
You can’t perform that action at this time.
0 commit comments