File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 1- DB_DIR =$(shell pwd) /_db
2- v =5.7
3- MYSQL_VERSION =$(v )
1+ V =5.7
2+ DB_DIR =$(shell pwd) /_db-$(V )
43
54start_db :
6- @echo Starting MySQL $(MYSQL_VERSION )
5+ @echo Starting MySQL $(V )
76 docker run --rm -d --name spatial-mysql \
87 -p 3306 :3306 \
98 -v $(DB_DIR ) :/var/lib/mysql \
109 -e MYSQL_DATABASE=spatial_test \
1110 -e MYSQL_ALLOW_EMPTY_PASSWORD=yes \
12- mysql :$(MYSQL_VERSION ) --character-set-server=utf8 --collation-server=utf8_general_ci
13- docker logs -f spatial-mysql
11+ mysql :$(V ) --character-set-server=utf8 --collation-server=utf8_general_ci
1412
15- purge_db :
16- docker stop spatial-mysql
13+ rm_db :
14+ docker stop spatial-mysql || true
1715 rm -Rf $(DB_DIR )
1816
17+ refresh_db : rm_db start_db
18+
1919get_ip :
2020 @docker inspect -f ' {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' spatial-mysql
You can’t perform that action at this time.
0 commit comments