Feature/update docker support (#319)

* Updated docker image according to discussion on https://github.com/hapifhir/hapi-fhir-jpaserver-starter/pull/305

* Added doc

* Added corrections according to comments

* Update Dockerfile

* Update build-images.yaml

Updated to default to distroless
This commit is contained in:
Jens Kristian Villadsen
2022-03-02 16:39:13 +01:00
committed by GitHub
parent deefd595dd
commit 24a20a7e97
2 changed files with 37 additions and 27 deletions

View File

@@ -19,25 +19,24 @@ jobs:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Docker meta
- name: Container meta for default (distroless) image
id: docker_meta
uses: docker/metadata-action@v3
with:
images: ${{ env.IMAGES }}
tags: |
type=match,pattern=image-(.*),group=1,enable=${{github.event_name != 'pull_request'}}
type=sha
- name: Docker distroless meta
id: docker_distroless_meta
- name: Container meta for tomcat image
id: docker_tomcat_meta
uses: docker/metadata-action@v3
with:
images: ${{ env.IMAGES }}
tags: |
type=match,pattern=image-(.*),group=1,enable=${{github.event_name != 'pull_request'}}
type=sha
flavor: |
suffix=-distroless,onlatest=true
suffix=-tomcat,onlatest=true
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
@@ -60,7 +59,7 @@ jobs:
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push
- name: Build and push default (distroless) image
id: docker_build
uses: docker/build-push-action@v2
with:
@@ -70,15 +69,16 @@ jobs:
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
platforms: ${{ env.PLATFORMS }}
target: default
- name: Build and push distroless
id: docker_build_distroless
- name: Build and push tomcat image
id: docker_build_tomcat
uses: docker/build-push-action@v2
with:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_distroless_meta.outputs.tags }}
labels: ${{ steps.docker_distroless_meta.outputs.labels }}
tags: ${{ steps.docker_tomcat_meta.outputs.tags }}
labels: ${{ steps.docker_tomcat_meta.outputs.labels }}
platforms: ${{ env.PLATFORMS }}
target: release-distroless
target: tomcat