修改基础镜像
Some checks failed
/ build-parent-pom (push) Successful in 2m5s
/ build-and-push-services (ruoyi-auth) (push) Failing after 1m8s
/ build-and-push-services (ruoyi-gateway) (push) Failing after 1m7s
/ build-and-push-services (ruoyi-modules/Property) (push) Failing after 1m30s
/ build-and-push-services (ruoyi-modules/Sis) (push) Failing after 33s
/ build-and-push-services (ruoyi-modules/ruoyi-gen) (push) Failing after 1m19s
/ build-and-push-services (ruoyi-modules/ruoyi-job) (push) Failing after 1m33s
/ build-and-push-services (ruoyi-modules/ruoyi-resource) (push) Failing after 1m21s
/ build-and-push-services (ruoyi-modules/ruoyi-system) (push) Failing after 1m34s
/ build-and-push-services (ruoyi-modules/ruoyi-workflow) (push) Failing after 1m20s
/ build-and-push-services (ruoyi-seata-server) (push) Failing after 20s
/ build-and-push-services (ruoyi-sentinel-dashboard) (push) Failing after 21s
/ build-and-push-services (ruoyi-visual/ruoyi-nacos) (push) Waiting to run
/ build-and-push-services (ruoyi-visual/ruoyi-monitor) (push) Has been cancelled
/ build-and-push-services (ruoyi-snailjob-server) (push) Has been cancelled

This commit is contained in:
mocheng 2025-08-14 16:44:11 +08:00
parent 8b9e053517
commit d9264b65ab
2 changed files with 6 additions and 42 deletions

View File

@ -191,51 +191,14 @@ jobs:
echo "dockerfile_path=${GITHUB_WORKSPACE}/Dockerfile" >> $GITHUB_OUTPUT echo "dockerfile_path=${GITHUB_WORKSPACE}/Dockerfile" >> $GITHUB_OUTPUT
fi fi
# - name: 构建并推送Docker镜像仅推送镜像不上传JAR
# uses: http://git.missmoc.top/mocheng/build-push-action@v5
# with:
# context: "${{ github.workspace }}"
# file: ${{ github.workspace }}/${{ matrix.service }}/Dockerfile
# tags: 172.100.10.45:3000/by2025/smartparks/${{ matrix.service }}:latest
# # tags: ${{ secrets.REGISTRY_URL }}/by2025/$(echo ${{ matrix.service }} | tr 'A-Z' 'a-z'):${{ github.sha }}
# # tags: ${{ secrets.REGISTRY_URL }}/by2025/${{ matrix.service }}:2.0.4
# push: true
# cache-from: type=gha
# cache-to: type=gha,mode=max
#
- name: 构建并推送Docker镜像仅推送镜像不上传JAR - name: 构建并推送Docker镜像仅推送镜像不上传JAR
uses: http://git.missmoc.top/mocheng/build-push-action@v5 uses: http://git.missmoc.top/mocheng/build-push-action@v5
with: with:
# 指定构建上下文为当前工作目录
context: "${{ github.workspace }}" context: "${{ github.workspace }}"
file: ${{ github.workspace }}/${{ matrix.service }}/Dockerfile
# 指定Dockerfile路径基于矩阵中的服务名称 tags: 172.100.10.45:3000/by2025/smartparks/${{ matrix.service }}:latest
file: "${{ github.workspace }}/${{ matrix.service }}/Dockerfile" # tags: ${{ secrets.REGISTRY_URL }}/by2025/$(echo ${{ matrix.service }} | tr 'A-Z' 'a-z'):${{ github.sha }}
# tags: ${{ secrets.REGISTRY_URL }}/by2025/${{ matrix.service }}:2.0.4
# 镜像标签,推送到私有仓库
tags: "172.100.10.45:3000/by2025/smartparks/${{ matrix.service }}:latest"
# 启用镜像推送
push: true push: true
# 使用GitHub Actions缓存加速构建
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max
# 新增:设置镜像拉取超时时间(秒)
pull-timeout: 300
# 新增构建参数可在Dockerfile中使用ARG引用
build-args: |
# 示例:使用国内镜像源加速基础镜像拉取
BASE_IMAGE_MIRROR=registry.cn-hangzhou.aliyuncs.com
# 新增配置Docker守护进程的镜像加速源
daemon-config: |
{
"registry-mirrors": [
"https://registry.cn-hangzhou.aliyuncs.com",
"https://hub-mirror.c.163.com",
"https://mirror.baidubce.com"
]
}

View File

@ -1,7 +1,8 @@
# 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/ # 贝尔实验室 Spring 官方推荐镜像 JDK下载地址 https://bell-sw.com/pages/downloads/
#FROM bellsoft/liberica-openjdk-debian:17.0.11-cds #FROM bellsoft/liberica-openjdk-debian:17.0.11-cds
FROM registry.cn-hangzhou.aliyuncs.com/aliyun_openjdk/openjdk:17-jdk-slim #FROM registry.cn-hangzhou.aliyuncs.com/aliyun_openjdk/openjdk:17-jdk-slim
#FROM bellsoft/liberica-openjdk-debian:21.0.5-cds #FROM bellsoft/liberica-openjdk-debian:21.0.5-cds
FROM 172.100.10.45:3000/by2025/base-images/liberica-openjdk-debian:17.0.11-cds
#FROM findepi/graalvm:java17-native #FROM findepi/graalvm:java17-native
LABEL maintainer="Lion Li" LABEL maintainer="Lion Li"