docker-compose & docker

This commit is contained in:
MaxKey
2024-10-01 12:17:56 +08:00
parent 8de16418e4
commit 1359bbfe89
14 changed files with 418 additions and 392 deletions

View File

@@ -2,22 +2,43 @@ echo off
call setEnvVars.bat
docker -v
set START_TIME="%date:~0,10% %time:~0,2%:%time:~3,5%"
echo start time %START_TIME%
call %GRADLE_HOME%/bin/gradle -q projects
rem call Set-ExecutionPolicy RemoteSigned -Scope Process
echo start clean . . .
cd ./maxkey-webs/maxkey-web-maxkey
call %GRADLE_HOME%/bin/gradle clean
call docker build -f Dockerfile -t %MXK_REPOSITORY%/maxkey .
echo clean complete .
rem maxkey:latest
rem push to docker hub
call docker push %MXK_REPOSITORY%/maxkey
rem for docker , run task build and jib
call %GRADLE_HOME%/bin/gradle build jib -x test
rem maxkey:$version
call docker tag %MXK_REPOSITORY%/maxkey %MXK_REPOSITORY%/maxkey:%MXK_VERSION%
rem push to docker hub
call docker push %MXK_REPOSITORY%/maxkey:%MXK_VERSION%
cd ../../
cd ./maxkey-webs/maxkey-web-mgt
call docker build -f Dockerfile -t %MXK_REPOSITORY%/maxkey-mgt .
rem maxkey-mgt:latest
rem push to docker hub
call docker push %MXK_REPOSITORY%/maxkey-mgt
rem maxkey-mgt:$version
call docker tag %MXK_REPOSITORY%/maxkey-mgt %MXK_REPOSITORY%/maxkey-mgt:%MXK_VERSION%
rem push to docker hub
call docker push %MXK_REPOSITORY%/maxkey-mgt:%MXK_VERSION%
set END_TIME="%date:~0,10% %time:~0,2%:%time:~3,5%"
echo Build Release start at %START_TIME% complete at %END_TIME%.
pause
pause