fix:增加自定义nexiot/sql镜像

This commit is contained in:
nexiot-studio
2025-11-14 22:36:23 +08:00
parent 989e20ec8d
commit 18748e521e
5 changed files with 56 additions and 2 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
[📖 文档地址](https://nexiotplatform.github.io/universal-iot-docs/) | [🌐 在线演示](http://iot.192886.xyz:81/) | [🔧 AI调试IDE](http://iot.192886.xyz:81/magic/debug/index.html)
</div>
sha256:59e398ed2fda3dcdc5d880edf96e0ef137e8fcd5d181588e309b13117480ae38
## ✨ 平台简介
**NexIoT AI物联网平台** 是一款采用创新架构设计的**真·零代码侵入**企业级物联网平台。
+1 -1
View File
@@ -74,7 +74,7 @@ services:
max-file: "3"
mysql:
image: ${MYSQL_IMAGE:-mysql:8.0}
image: nexiot/mysql8:2.0
container_name: cn-universal-mysql
restart: unless-stopped
environment:
+7
View File
@@ -0,0 +1,7 @@
FROM mysql:8.0
# 复制初始化 SQL 文件到容器
COPY init/*.sql /docker-entrypoint-initdb.d/
# 设置权限
RUN chmod -R 755 /docker-entrypoint-initdb.d/
+25
View File
@@ -0,0 +1,25 @@
@echo off
chcp 65001 >nul
REM 构建 MySQL 镜像
echo 🔨 Building custom MySQL image with init data...
REM 设置镜像名称和版本
set IMAGE_NAME=nexiot/mysql
set IMAGE_TAG=8.0-init
REM 构建镜像
docker build -t %IMAGE_NAME%:%IMAGE_TAG% -f docker/mysql/Dockerfile docker/mysql/
REM 检查构建结果
if %errorlevel% equ 0 (
echo ✅ MySQL image built successfully: %IMAGE_NAME%:%IMAGE_TAG%
echo.
echo 📤 Push to registry:
echo docker push %IMAGE_NAME%:%IMAGE_TAG%
) else (
echo ❌ Build failed!
exit /b 1
)
pause
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
# 构建 MySQL 镜像
echo "🔨 Building custom MySQL image with init data..."
# 设置镜像名称和版本
IMAGE_NAME="nexiot/mysql"
IMAGE_TAG="8.0-init"
# 构建镜像
docker build -t ${IMAGE_NAME}:${IMAGE_TAG} -f docker/mysql/Dockerfile docker/mysql/
# 检查构建结果
if [ $? -eq 0 ]; then
echo "✅ MySQL image built successfully: ${IMAGE_NAME}:${IMAGE_TAG}"
echo ""
echo "📤 Push to registry:"
echo " docker push ${IMAGE_NAME}:${IMAGE_TAG}"
else
echo "❌ Build failed!"
exit 1
fi