ssh-audit/Makefile.docker
Sebastian Cohnen 982c0b4c72
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
2023-09-06 22:32:18 -04:00

24 lines
612 B
Docker

VERSION = $(shell grep VERSION src/ssh_audit/globals.py | grep -E -o "'(v.*)'" | tr -d "'")
ifeq ($(VERSION),)
$(error "could not determine 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} .
upload:
docker login
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--tag positronsecurity/ssh-audit:${VERSION} \
--tag positronsecurity/ssh-audit:latest \
--push \
.