Files
volker.raschek cd1d27e0b8
Lint Markdown files / markdown-lint (push) Successful in 6s
Release latest / push-amd64 (push) Successful in 1m5s
Release latest / push-arm64 (push) Successful in 1m51s
Release latest / push-manifest (push) Failing after 14m49s
Release latest / sync-to-hub-docker-io (push) Has been skipped
fix(ci): adapt rfc3339 pattern
2026-06-05 13:10:17 +02:00

46 lines
1.9 KiB
Makefile

# CONTAINER_RUNTIME
# The CONTAINER_RUNTIME variable will be used to specified the path to a container runtime. This is needed to start and
# run a container image.
CONTAINER_RUNTIME?=$(shell which podman)
# DC_IMAGE_REGISTRY_NAME
# Defines the name of the new container to be built using several variables.
DC_IMAGE_REGISTRY_NAME?=git.cryptic.systems
DC_IMAGE_REGISTRY_USER?=volker.raschek
DC_IMAGE_NAMESPACE?=${DC_IMAGE_REGISTRY_USER}
DC_IMAGE_NAME:=docker-compose
DC_IMAGE_VERSION?=latest
DC_IMAGE_FULLY_QUALIFIED=${DC_IMAGE_REGISTRY_NAME}/${DC_IMAGE_NAMESPACE}/${DC_IMAGE_NAME}:${DC_IMAGE_VERSION}
# BUILD CONTAINER IMAGE
# =====================================================================================================================
PHONY:=container-image/build
container-image/build:
${CONTAINER_RUNTIME} build \
--build-arg BUILD_DATE="$(shell date -u +"%Y-%m-%dT%H:%M:%SZ")" \
--file Dockerfile \
--no-cache \
--pull \
--tag ${DC_IMAGE_FULLY_QUALIFIED} \
.
# DELETE CONTAINER IMAGE
# =====================================================================================================================
PHONY:=container-image/delete
container-image/delete:
- ${CONTAINER_RUNTIME} image rm ${DC_IMAGE_FULLY_QUALIFIED}
# PUSH CONTAINER IMAGE
# =====================================================================================================================
PHONY+=container-image/push
container-image/push:
echo ${DC_IMAGE_REGISTRY_PASSWORD} | ${CONTAINER_RUNTIME} login ${DC_IMAGE_REGISTRY_NAME} --username ${DC_IMAGE_REGISTRY_USER} --password-stdin
${CONTAINER_RUNTIME} push ${DC_IMAGE_FULLY_QUALIFIED}
# PHONY
# =====================================================================================================================
# Declare the contents of the PHONY variable as phony. We keep that information in a variable so we can use it in
# if_changed.
.PHONY: ${PHONY}