Skip to content

Commit

Permalink
✨ feat(build.gradle, Dockerfile, gradle-build.yml): Update Dock…
Browse files Browse the repository at this point in the history
…er image names and registry for local deployment.
  • Loading branch information
vnobo committed Dec 17, 2024
1 parent b72261e commit 07d42e0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion boot/oauth2/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion boot/platform/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 " +
Expand Down

0 comments on commit 07d42e0

Please sign in to comment.