diff --git a/.github/workflows/gradle-build.yml b/.github/workflows/gradle-build.yml index fca17972..c30fccda 100644 --- a/.github/workflows/gradle-build.yml +++ b/.github/workflows/gradle-build.yml @@ -17,6 +17,11 @@ env: jobs: boot-build-image: runs-on: ubuntu-latest + services: + registry: + image: registry:2 + ports: + - 5000:5000 permissions: contents: read packages: write @@ -34,18 +39,24 @@ jobs: distribution: 'liberica' native-image-job-reports: 'true' cache: 'gradle' -# - name: Set up QEMU -# uses: docker/setup-qemu-action@v3 -# with: -# platforms: linux/amd64,linux/arm64 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: linux/amd64,linux/arm64 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + driver-opts: network=host - name: Execute Gradle Plate bootBuildImage run: | chmod +x ./gradlew - ./gradlew bootBuildImage --imagePlatform=linux/amd64 - ./gradlew bootBuildImage --imagePlatform=linux/arm64 + ./gradlew bootBuildImage --imagePlatform=linux/amd64 --network=host --publishImage=true + ./gradlew bootBuildImage --imagePlatform=linux/arm64 --network=host --publishImage=true + - name: Inspect + run: | + docker buildx imagetools inspect localhost:5000/plate-oauth2:latest + docker buildx imagetools inspect localhost:5000/plate-platform:latest - name: Log into registry ${{ env.GITHUB_REGISTRY }} if: github.event_name != 'pull_request' diff --git a/boot/oauth2/Dockerfile b/boot/oauth2/Dockerfile index b1175412..d358147b 100644 --- a/boot/oauth2/Dockerfile +++ b/boot/oauth2/Dockerfile @@ -1,4 +1,4 @@ -FROM plate-oauth2 +FROM localhost:5000/plate-oauth2:latest LABEL org.opencontainers.image.source=https://github.com/vnobo/plate LABEL org.opencontainers.image.description="Plate oauth2 container image" diff --git a/boot/platform/Dockerfile b/boot/platform/Dockerfile index 7d4f7112..bee6c874 100644 --- a/boot/platform/Dockerfile +++ b/boot/platform/Dockerfile @@ -1,4 +1,4 @@ -FROM plate-platform +FROM localhost:5000/plate-platform:latest LABEL org.opencontainers.image.source=https://github.com/vnobo/plate LABEL org.opencontainers.image.description="Plate platform container image" diff --git a/build.gradle b/build.gradle index 39097795..5005ad70 100644 --- a/build.gradle +++ b/build.gradle @@ -28,7 +28,7 @@ configure(subprojects - project(":boot")) { project -> tasks.named("bootBuildImage") { createdDate = "now" - imageName = "${rootProject.name}-${project.name}" + imageName = "-localhost:5000/${rootProject.name}-${project.name}:latest" environment = [ "BPE_DELIM_JAVA_TOOL_OPTIONS" : " ", "BPE_APPEND_JAVA_TOOL_OPTIONS": "-Dfile.encoding=UTF-8 " +