no message

This commit is contained in:
Armamem0t 2025-06-26 22:06:06 +08:00
parent d982c891e0
commit 019676c2d9
Signed by: minglipro
GPG Key ID: 5F355A77B22AA93B
5 changed files with 66 additions and 1 deletions

1
.env.cmd Normal file
View File

@ -0,0 +1 @@
SET VERSION=0.6

3
.gitattributes vendored Normal file
View File

@ -0,0 +1,3 @@
* text eol=lf
*.bat text eol=crlf
*.cmd text eol=lf

25
build Normal file
View File

@ -0,0 +1,25 @@
:: 加载环境变量
content=$(<".env.cmd")
redata=${content//'SET '/''}
echo "$redata" > 'tmp.env'
source tmp.env
rm -rf tmp.env
:: 构建 Docker 镜像
echo [INFO] Building Docker image...
docker build -f ubuntu-jdk8-gradle8-node22.dockerfile -t tmpimg .
echo [INFO] Tagging image...
docker tag tmpimg docker-mingliqiye.mingliqiye.com/ubuntu_jdk8_gradle8_node22
docker tag tmpimg docker-mingliqiye.mingliqiye.com/ubuntu_jdk8_gradle8_node22:$VERSION
:: 推送镜像
echo [INFO] Pushing images...
docker push docker-mingliqiye.mingliqiye.com/ubuntu_jdk8_gradle8_node22
docker push docker-mingliqiye.mingliqiye.com/ubuntu_jdk8_gradle8_node22:$VERSION
:: 清理临时镜像
echo [INFO] Cleaning up...
docker rmi tmpimg
echo [SUCCESS] Build and push completed

36
build.bat Normal file
View File

@ -0,0 +1,36 @@
@echo off
setlocal enabledelayedexpansion
:: 加载环境变量
call .env.cmd
:: 检查必要变量
if not defined VERSION (
echo ERROR: VERSION is not defined in .env file
exit /b 1
)
:: 构建Docker镜像
echo [INFO] Building Docker image...
docker build -f ubuntu-jdk8-gradle8-node22.dockerfile -t tmpimg .
if %errorlevel% neq 0 (
echo ERROR: Docker build failed
exit /b 1
)
:: 标记镜像
echo [INFO] Tagging image...
docker tag tmpimg docker-mingliqiye.mingliqiye.com/ubuntu_jdk8_gradle8_node22
docker tag tmpimg docker-mingliqiye.mingliqiye.com/ubuntu_jdk8_gradle8_node22:%VERSION%
:: 推送镜像
echo [INFO] Pushing images...
docker push docker-mingliqiye.mingliqiye.com/ubuntu_jdk8_gradle8_node22
docker push docker-mingliqiye.mingliqiye.com/ubuntu_jdk8_gradle8_node22:%VERSION%
:: 清理临时镜像
echo [INFO] Cleaning up...
docker rmi tmpimg
echo [SUCCESS] Build and push completed
endlocal

View File

@ -2,7 +2,7 @@ FROM ubuntu
# 一次性安装所有依赖并清理缓存
RUN apt update -y && \
apt install -y wget unzip xz-utils curl jq tree less vim dnsutils iputils-ping net-tools lsb-release gnupg-agent apt-transport-https build-essential ca-certificates git
apt install -y python3 wget unzip xz-utils curl jq tree less vim dnsutils iputils-ping net-tools lsb-release gnupg-agent apt-transport-https build-essential ca-certificates git
# 下载并解压 Gradle、JDK、Node.js
RUN wget "https://repository.mingliqiye.com/repository/raw/gradle/gradle-8.14.2-all.zip" && \