Skip to content

Commit

Permalink
build(image): update command to build image locally (#2930)
Browse files Browse the repository at this point in the history
  • Loading branch information
iromli authored Nov 8, 2022
1 parent 0fea95a commit 056411c
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 56 deletions.
14 changes: 7 additions & 7 deletions docker-jans-auth-server/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
CN_VERSION?=1.0.5-SNAPSHOT
IMAGE_NAME=janssenproject/auth-server
UNSTABLE_VERSION?=dev
DEV_VERSION?=$(shell echo ${CN_VERSION} | cut -d '-' -f 1)_dev

.PHONY: test clean all build-dev trivy-scan grype-scan
.DEFAULT_GOAL := build-dev

build-dev:
@echo "[I] Building Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} .
@echo "[I] Building Docker image ${IMAGE_NAME}:${DEV_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${DEV_VERSION} .

trivy-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using trivy"
@trivy image --security-checks vuln ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using trivy"
@trivy image --security-checks vuln ${IMAGE_NAME}:${DEV_VERSION}

grype-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${DEV_VERSION}
14 changes: 7 additions & 7 deletions docker-jans-certmanager/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
CN_VERSION?=1.0.5-SNAPSHOT
IMAGE_NAME=janssenproject/certmanager
UNSTABLE_VERSION?=dev
DEV_VERSION?=$(shell echo ${CN_VERSION} | cut -d '-' -f 1)_dev

.PHONY: test clean all build-dev trivy-scan grype-scan
.DEFAULT_GOAL := build-dev

build-dev:
@echo "[I] Building Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} .
@echo "[I] Building Docker image ${IMAGE_NAME}:${DEV_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${DEV_VERSION} .

trivy-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using trivy"
@trivy image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using trivy"
@trivy image --security-checks vuln ${IMAGE_NAME}:${DEV_VERSION}

grype-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${DEV_VERSION}
14 changes: 7 additions & 7 deletions docker-jans-config-api/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
CN_VERSION?=1.0.5-SNAPSHOT
IMAGE_NAME=janssenproject/config-api
UNSTABLE_VERSION?=dev
DEV_VERSION?=$(shell echo ${CN_VERSION} | cut -d '-' -f 1)_dev

.PHONY: test clean all build-dev trivy-scan grype-scan
.DEFAULT_GOAL := build-dev

build-dev:
@echo "[I] Building Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} .
@echo "[I] Building Docker image ${IMAGE_NAME}:${DEV_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${DEV_VERSION} .

trivy-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using trivy"
@trivy image --security-checks vuln ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using trivy"
@trivy image --security-checks vuln ${IMAGE_NAME}:${DEV_VERSION}

grype-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${DEV_VERSION}
14 changes: 7 additions & 7 deletions docker-jans-configurator/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
CN_VERSION?=1.0.5-SNAPSHOT
IMAGE_NAME=janssenproject/configurator
UNSTABLE_VERSION?=dev
DEV_VERSION?=$(shell echo ${CN_VERSION} | cut -d '-' -f 1)_dev

.PHONY: test clean all build-dev trivy-scan grype-scan
.DEFAULT_GOAL := build-dev

build-dev:
@echo "[I] Building Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} .
@echo "[I] Building Docker image ${IMAGE_NAME}:${DEV_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${DEV_VERSION} .

trivy-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using trivy"
@trivy image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using trivy"
@trivy image --security-checks vuln ${IMAGE_NAME}:${DEV_VERSION}

grype-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${DEV_VERSION}
14 changes: 7 additions & 7 deletions docker-jans-fido2/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
CN_VERSION?=1.0.5-SNAPSHOT
IMAGE_NAME=janssenproject/fido2
UNSTABLE_VERSION?=dev
DEV_VERSION?=$(shell echo ${CN_VERSION} | cut -d '-' -f 1)_dev

.PHONY: test clean all build-dev trivy-scan grype-scan
.DEFAULT_GOAL := build-dev

build-dev:
@echo "[I] Building Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} .
@echo "[I] Building Docker image ${IMAGE_NAME}:${DEV_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${DEV_VERSION} .

trivy-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using trivy"
@trivy image --security-checks vuln ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using trivy"
@trivy image --security-checks vuln ${IMAGE_NAME}:${DEV_VERSION}

grype-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${DEV_VERSION}
14 changes: 7 additions & 7 deletions docker-jans-monolith/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
CN_VERSION?=1.0.5-SNAPSHOT
IMAGE_NAME=janssenproject/monolith
UNSTABLE_VERSION?=dev
DEV_VERSION?=$(shell echo ${CN_VERSION} | cut -d '-' -f 1)_dev

.PHONY: test clean all build-dev trivy-scan grype-scan
.DEFAULT_GOAL := build-dev

build-dev:
@echo "[I] Building Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} .
@echo "[I] Building Docker image ${IMAGE_NAME}:${DEV_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${DEV_VERSION} .

trivy-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using trivy"
@trivy image --security-checks vuln ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using trivy"
@trivy image --security-checks vuln ${IMAGE_NAME}:${DEV_VERSION}

grype-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${DEV_VERSION}
14 changes: 7 additions & 7 deletions docker-jans-persistence-loader/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
CN_VERSION?=1.0.5-SNAPSHOT
IMAGE_NAME=janssenproject/persistence-loader
UNSTABLE_VERSION?=dev
DEV_VERSION?=$(shell echo ${CN_VERSION} | cut -d '-' -f 1)_dev

.PHONY: test clean all build-dev trivy-scan grype-scan
.DEFAULT_GOAL := build-dev

build-dev:
@echo "[I] Building Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} .
@echo "[I] Building Docker image ${IMAGE_NAME}:${DEV_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${DEV_VERSION} .

trivy-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using trivy"
@trivy image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using trivy"
@trivy image --security-checks vuln ${IMAGE_NAME}:${DEV_VERSION}

grype-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${DEV_VERSION}
14 changes: 7 additions & 7 deletions docker-jans-scim/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
CN_VERSION?=1.0.5-SNAPSHOT
IMAGE_NAME=janssenproject/scim
UNSTABLE_VERSION?=dev
DEV_VERSION?=$(shell echo ${CN_VERSION} | cut -d '-' -f 1)_dev

.PHONY: test clean all build-dev trivy-scan grype-scan
.DEFAULT_GOAL := build-dev

build-dev:
@echo "[I] Building Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} .
@echo "[I] Building Docker image ${IMAGE_NAME}:${DEV_VERSION}"
@docker build --rm --force-rm -t ${IMAGE_NAME}:${DEV_VERSION} .

trivy-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using trivy"
@trivy image --security-checks vuln ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using trivy"
@trivy image --security-checks vuln ${IMAGE_NAME}:${DEV_VERSION}

grype-scan:
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${CN_VERSION}_${UNSTABLE_VERSION}
@echo "[I] Scanning Docker image ${IMAGE_NAME}:${DEV_VERSION} using grype"
@grype -v ${IMAGE_NAME}:${DEV_VERSION}

0 comments on commit 056411c

Please sign in to comment.