Skip to content

Commit

Permalink
Merge pull request #271 from hmcts/RDCC-4745
Browse files Browse the repository at this point in the history
Ref data - LRD load Add multi arch image configuration
  • Loading branch information
shivajilokare authored May 31, 2022
2 parents 674ab5c + d7c5d9f commit fe3cde7
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG APP_INSIGHTS_AGENT_VERSION=3.2.4

ARG PLATFORM=""
# Application image

FROM hmctspublic.azurecr.io/base/java:17-distroless
FROM hmctspublic.azurecr.io/base/java${PLATFORM}:17-distroless

COPY lib/AI-Agent.xml /opt/app/
COPY build/libs/rd-location-ref-data-load.jar /opt/app/
Expand Down
52 changes: 52 additions & 0 deletions acb.tpl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: 1.0-preview-1
steps:
- id: pull-base-image-amd64
cmd: docker pull --platform linux/amd64 hmctspublic.azurecr.io/base/java:17-distroless && docker tag hmctspublic.azurecr.io/base/java:17-distroless hmctspublic.azurecr.io/base/java/linux/amd64:17-distroless
when: ["-"]
keep: true

- id: runtime-amd64
build: >
-t {{.Run.Registry}}/{{CI_IMAGE_TAG}}-amd64
--build-arg PLATFORM=/linux/amd64
--platform linux/amd64
.
when:
- pull-base-image-amd64
keep: true

- id: pull-base-image-arm64
cmd: docker pull --platform linux/arm64 hmctspublic.azurecr.io/base/java:17-distroless && docker tag hmctspublic.azurecr.io/base/java:17-distroless hmctspublic.azurecr.io/base/java/linux/arm64:17-distroless
when:
- pull-base-image-amd64
keep: true

- id: runtime-arm64
build: >
-t {{.Run.Registry}}/{{CI_IMAGE_TAG}}-arm64
--build-arg PLATFORM=/linux/arm64
--platform linux/arm64/v8
.
when:
- pull-base-image-arm64
keep: true

- id: push-images
push:
- "{{.Run.Registry}}/{{CI_IMAGE_TAG}}-amd64"
- "{{.Run.Registry}}/{{CI_IMAGE_TAG}}-arm64"
when:
- runtime-amd64
- runtime-arm64

- id: manifest-create
cmd: docker manifest create {{.Run.Registry}}/{{CI_IMAGE_TAG}} {{.Run.Registry}}/{{CI_IMAGE_TAG}}-amd64 {{.Run.Registry}}/{{CI_IMAGE_TAG}}-arm64
when:
- push-images
keep: true

- id: manifest-push
cmd: docker manifest push --purge {{.Run.Registry}}/{{CI_IMAGE_TAG}}
when:
- manifest-create
keep: true

0 comments on commit fe3cde7

Please sign in to comment.