Skip to content

Commit 52e7b75

Browse files
authored
Add nacos mysql schema sql file to docker file from github.com (#1288)
1 parent 1e14d8a commit 52e7b75

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

test/build-nacos-image.sh

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
#!/bin/bash
22

33
mkdir nacos-mysql
4-
curl -o nacos-mysql/Dockerfile https://raw.githubusercontent.com/nacos-group/nacos-docker/master/example/image/mysql/5.7/Dockerfile
5-
docker build -t nacos-mysql:5.7 nacos-mysql/
4+
5+
#curl -o nacos-mysql/Dockerfile https://raw.githubusercontent.com/nacos-group/nacos-docker/master/example/image/mysql/5.7/Dockerfile
6+
7+
#Since mysql-schema.sql is not found at https://raw.githubusercontent.com, we add it from github.com:
8+
cat > nacos-mysql/Dockerfile << EOF
9+
FROM mysql:5.7.40
10+
ADD https://github.com/alibaba/nacos/blob/master/distribution/conf/mysql-schema.sql /docker-entrypoint-initdb.d/nacos-mysql.sql
11+
RUN chown -R mysql:mysql /docker-entrypoint-initdb.d/nacos-mysql.sql
12+
EXPOSE 3306
13+
CMD ["mysqld", "--character-set-server=utf8mb4", "--collation-server=utf8mb4_unicode_ci"]
14+
EOF
15+
16+
docker build -t nacos-mysql:5.7 nacos-mysql/

0 commit comments

Comments
 (0)