Docker: Build multi-arch container images for amd64, arm64 and arm/v7 (#194)

* builds multi-arch container images for linux/{amd64,arm64,arm/v7}

* adds local-build build target for easier local testing
This commit is contained in:
Sebastian Cohnen 2023-09-07 04:32:18 +02:00 committed by GitHub
parent e26597a7aa
commit 982c0b4c72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,10 +4,20 @@ ifeq ($(VERSION),)
endif
all:
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--tag positronsecurity/ssh-audit:${VERSION} \
--tag positronsecurity/ssh-audit:latest \
.
local-build:
docker build -t positronsecurity/ssh-audit:${VERSION} .
docker tag positronsecurity/ssh-audit:${VERSION} positronsecurity/ssh-audit:latest
upload:
docker login
docker push positronsecurity/ssh-audit:${VERSION}
docker push positronsecurity/ssh-audit:latest
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--tag positronsecurity/ssh-audit:${VERSION} \
--tag positronsecurity/ssh-audit:latest \
--push \
.