Skip to content

Commit c97fdf3

Browse files
committed
pin mysql image to 5.7
See mysqljs/mysql#2002
1 parent be599b9 commit c97fdf3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

setup.sh

100644100755
+8-3
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,19 @@ printf "\n${RED}>> Finding old builds and cleaning up${PLAIN} ${GREEN}...${PLAIN
4848
docker rm -f $MYSQL_CONTAINER > /dev/null 2>&1
4949
printf "\n${CYAN}Clean up complete.${PLAIN}\n"
5050

51+
## Pin mysql docker image to version as `mysql` node.js driver does not support v8 yet
52+
## See https://github.com/mysqljs/mysql/issues/2002
53+
DOCKER_IMAGE=mysql:5.7.22
54+
5155
## pull latest mysql image
52-
printf "\n${RED}>> Pulling latest mysql image${PLAIN} ${GREEN}...${PLAIN}"
53-
docker pull mysql:latest > /dev/null 2>&1
56+
printf "\n${RED}>> Pulling ${DOCKER_IMAGE} image${PLAIN} ${GREEN}...${PLAIN}"
57+
58+
docker pull ${DOCKER_IMAGE} > /dev/null 2>&1
5459
printf "\n${CYAN}Image successfully built.${PLAIN}\n"
5560

5661
## run the mysql container
5762
printf "\n${RED}>> Starting the mysql container${PLAIN} ${GREEN}...${PLAIN}"
58-
CONTAINER_STATUS=$(docker run --name $MYSQL_CONTAINER -e MYSQL_ROOT_USER=$USER -e MYSQL_ROOT_PASSWORD=$PASSWORD -p $PORT:3306 -d mysql:latest 2>&1)
63+
CONTAINER_STATUS=$(docker run --name $MYSQL_CONTAINER -e MYSQL_ROOT_USER=$USER -e MYSQL_ROOT_PASSWORD=$PASSWORD -p $PORT:3306 -d ${DOCKER_IMAGE} 2>&1)
5964
if [[ "$CONTAINER_STATUS" == *"Error"* ]]; then
6065
printf "\n\n${CYAN}Status: ${PLAIN}${RED}Error starting container. Terminating setup.${PLAIN}\n\n"
6166
exit 1

test/init.js

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ module.exports = require('should');
1010
var DataSource = require('loopback-datasource-juggler').DataSource;
1111

1212
var config = require('rc')('loopback', {test: {mysql: {}}}).test.mysql;
13-
console.log(config);
1413
global.getConfig = function(options) {
1514
var dbConf = {
1615
host: process.env.MYSQL_HOST || config.host || 'localhost',

0 commit comments

Comments
 (0)