Adjust Docker build defaults
This commit is contained in:
parent
ff754783cb
commit
1595380854
37
Makefile
37
Makefile
@ -1,8 +1,13 @@
|
|||||||
# Multi-platform Docker build and publish for CyberChef
|
# Multi-platform Docker build and publish for CyberChef
|
||||||
|
|
||||||
IMAGE_NAME ?= ghcr.io/gchq/cyberchef
|
IMAGE_NAME ?= ghcr.io/mkilijanek/cyberchef
|
||||||
PLATFORMS ?= linux/amd64,linux/arm64
|
PLATFORMS ?= linux/amd64,linux/arm64
|
||||||
MONTHLY_TAG ?= $(shell date +%Y-%m)
|
MONTHLY_TAG ?= $(shell date +%Y-%m)
|
||||||
|
SBOM ?= false
|
||||||
|
PROVENANCE ?= false
|
||||||
|
|
||||||
|
SBOM_FLAG := $(if $(filter true,$(SBOM)),--sbom=true,)
|
||||||
|
PROVENANCE_FLAG := $(if $(filter true,$(PROVENANCE)),--provenance=true,)
|
||||||
|
|
||||||
.PHONY: check-branch build publish scan
|
.PHONY: check-branch build publish scan
|
||||||
|
|
||||||
@ -16,25 +21,25 @@ check-branch:
|
|||||||
build: check-branch
|
build: check-branch
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--pull \
|
--pull \
|
||||||
--platform $(PLATFORMS) \
|
--platform $(PLATFORMS) \
|
||||||
--tag $(IMAGE_NAME):latest \
|
--tag $(IMAGE_NAME):latest \
|
||||||
--tag $(IMAGE_NAME):$(MONTHLY_TAG) \
|
--tag $(IMAGE_NAME):$(MONTHLY_TAG) \
|
||||||
--sbom=true \
|
$(SBOM_FLAG) \
|
||||||
--provenance=true \
|
$(PROVENANCE_FLAG) \
|
||||||
--output=type=docker \
|
--output=type=docker \
|
||||||
.
|
.
|
||||||
|
|
||||||
publish: check-branch
|
publish: check-branch
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--pull \
|
--pull \
|
||||||
--platform $(PLATFORMS) \
|
--platform $(PLATFORMS) \
|
||||||
--tag $(IMAGE_NAME):latest \
|
--tag $(IMAGE_NAME):latest \
|
||||||
--tag $(IMAGE_NAME):$(MONTHLY_TAG) \
|
--tag $(IMAGE_NAME):$(MONTHLY_TAG) \
|
||||||
--sbom=true \
|
$(SBOM_FLAG) \
|
||||||
--provenance=true \
|
$(PROVENANCE_FLAG) \
|
||||||
--push \
|
--push \
|
||||||
.
|
.
|
||||||
$(MAKE) scan
|
$(MAKE) scan
|
||||||
|
|
||||||
scan:
|
scan:
|
||||||
docker scout cves $(IMAGE_NAME):latest --only-severity critical,high || true
|
docker scout cves $(IMAGE_NAME):latest --only-severity critical,high || true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user