2022-01-30 15:21:23 +00:00
|
|
|
# POSTFIXADMIN_VERSION
|
|
|
|
# Only required to install a specifiy version
|
2024-12-03 17:35:10 +00:00
|
|
|
POSTFIXADMIN_VERSION?=3.3.14
|
2022-01-30 15:21:23 +00:00
|
|
|
|
2024-03-02 13:45:19 +00:00
|
|
|
# PODMAN_BIN's and tools
|
|
|
|
PODMAN_BIN?=$(shell which podman)
|
2021-08-30 16:09:14 +00:00
|
|
|
|
2024-03-02 13:45:19 +00:00
|
|
|
# POSTFIXADMIN_IMAGE
|
|
|
|
POSTFIXADMIN_IMAGE_REGISTRY_HOST:=git.cryptic.systems
|
|
|
|
POSTFIXADMIN_IMAGE_REPOSITORY?=volker.raschek/postfixadmin
|
2021-08-30 16:09:14 +00:00
|
|
|
POSTFIXADMIN_IMAGE_VERSION?=latest
|
2024-03-02 13:45:19 +00:00
|
|
|
POSTFIXADMIN_IMAGE_FULLY_QUALIFIED=${POSTFIXADMIN_IMAGE_REGISTRY_HOST}/${POSTFIXADMIN_IMAGE_REPOSITORY}:${POSTFIXADMIN_IMAGE_VERSION}
|
2021-08-30 16:09:14 +00:00
|
|
|
|
|
|
|
# BUILD CONTAINER IMAGE
|
|
|
|
# ==============================================================================
|
|
|
|
PHONY:=container-image/build
|
|
|
|
container-image/build:
|
2024-03-02 13:45:19 +00:00
|
|
|
${PODMAN_BIN} build \
|
2021-08-30 16:09:14 +00:00
|
|
|
--build-arg POSTFIXADMIN_VERSION=${POSTFIXADMIN_VERSION} \
|
|
|
|
--file Dockerfile \
|
|
|
|
--no-cache \
|
|
|
|
--pull \
|
|
|
|
--tag ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED} \
|
|
|
|
.
|
|
|
|
|
|
|
|
# DELETE CONTAINER IMAGE
|
|
|
|
# ==============================================================================
|
|
|
|
PHONY:=container-image/delete
|
|
|
|
container-image/delete:
|
2024-03-02 13:45:19 +00:00
|
|
|
- ${PODMAN_BIN} image rm ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED}
|
2021-08-30 16:09:14 +00:00
|
|
|
|
|
|
|
# PUSH CONTAINER IMAGE
|
|
|
|
# ==============================================================================
|
|
|
|
PHONY+=container-image/push
|
|
|
|
container-image/push:
|
2024-03-02 13:45:19 +00:00
|
|
|
echo ${POSTFIXADMIN_IMAGE_REGISTRY_PASSWORD} | ${PODMAN_BIN} login ${POSTFIXADMIN_IMAGE_REGISTRY_NAME} --username ${POSTFIXADMIN_IMAGE_REGISTRY_USER} --password-stdin
|
|
|
|
${PODMAN_BIN} push ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED}
|
|
|
|
${PODMAN_BIN} logout ${POSTFIXADMIN_IMAGE_REGISTRY_HOST}
|
|
|
|
|
|
|
|
# PUSH CONTAINER IMAGE TO DOCKER
|
|
|
|
# ==============================================================================
|
|
|
|
PHONY+=container-image/push-to-docker-daemon
|
|
|
|
container-image/push-to-docker-daemon:
|
|
|
|
${PODMAN_BIN} push ${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED} docker-daemon:${POSTFIXADMIN_IMAGE_FULLY_QUALIFIED}
|
2021-08-30 16:09:14 +00:00
|
|
|
|
|
|
|
# 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.
|
2024-03-02 13:45:19 +00:00
|
|
|
.PHONY: ${PHONY}
|