Dockerfile: Rework generation of kas images

While kas and kas-isar surely have a common ground like the kas tool
itself, kas-isar does not need all the toolchain packages that are
essential Yocto dependencies. Splitting up the images earlier allows to
shrink kas-isar by almost 400 MB.

Use this chance to model both images as different build stages of the
same Dockerfile. That is simpler than creating a temporary "kas-base"
image via a separate Dockerfile.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
Jan Kiszka
2022-08-26 14:34:37 +02:00
parent 46b1c199a3
commit a6b18abc8a
5 changed files with 38 additions and 39 deletions

View File

@@ -41,7 +41,7 @@ jobs:
- name: Build kas-isar image
uses: docker/build-push-action@v2
with:
file: Dockerfile.isar
target: kas-isar
platforms: linux/amd64,linux/arm64
push: ${{ env.PUSH_MASTER }}
tags: ghcr.io/siemens/kas/kas-isar

View File

@@ -96,9 +96,8 @@ jobs:
- name: Build kas-isar image
uses: docker/build-push-action@v2
with:
file: Dockerfile.isar
target: kas-isar
load: true
build-args: KAS_TAG=next
tags: ghcr.io/siemens/kas/kas-isar:next
- name: Test kas-isar image
run: |
@@ -107,8 +106,7 @@ jobs:
- name: Complete build and deploy kas-isar image
uses: docker/build-push-action@v2
with:
file: Dockerfile.isar
target: kas-isar
platforms: linux/amd64,linux/arm64
build-args: KAS_TAG=next
tags: ghcr.io/siemens/kas/kas-isar:next
push: true

View File

@@ -36,7 +36,7 @@ jobs:
- name: Build kas-isar image
uses: docker/build-push-action@v2
with:
file: Dockerfile.isar
target: kas-isar
platforms: linux/amd64,linux/arm64
push: true
tags: |