You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Required to have docker build output always printed on stdout
exportBUILDKIT_PROGRESS=plain
## Required to have the commit SHA added as a Docker image label
exportCOMMIT_SHA=$(shell git rev-parse HEAD)
current_os := $(shell uname -s)
current_arch := $(shell uname -m)
exportOS ?= $(shell \
case "$(current_os)" in \
(Linux) echo linux ;; \
(Darwin) echo linux ;; \
(MINGW*|MSYS*|CYGWIN*) echo windows ;; \
(*) echo unknown ;; \
esac)
exportARCH ?= $(shell \
case $(current_arch) in \
(x86_64) echo "amd64" ;; \
(aarch64|arm64) echo "arm64" ;; \
(s390*|riscv*|ppc64le) echo $(current_arch);; \
(*) echo "UNKNOWN-CPU";; \
esac)
all: hadolint shellcheck build test
# Set to 'true' to disable parallel tests
DISABLE_PARALLEL_TESTS ?= false
# Set to the path of a specific test suite to restrict execution only to this
# default is "all test suites in the "tests/" directory
TEST_SUITES ?= $(CURDIR)/tests
##### Macros
## Check the presence of a CLI in the current PATH
check_cli = type "$(1)" >/dev/null 2>&1 || { echo "Error: command '$(1)' required but not found. Exiting." ; exit 1 ; }
## Check if a given image exists in the current manifest docker-bake.hcl
check_image = make --silent list | grep -w '$(1)' >/dev/null 2>&1 || { echo "Error: the image '$(1)' does not exist in manifest for the current platform '$(OS)/$(ARCH)'. Please check the output of 'make list'. Exiting." ; exit 1 ; }
## Base "docker buildx base" command to be reused everywhere