From 2e913386cc8ee781f7e902139c95ffc4c99243b9 Mon Sep 17 00:00:00 2001 From: Oz Tiram Date: Sun, 2 Jul 2023 23:19:20 +0200 Subject: [PATCH] Witchcraft and sourcery (#5774) Makefile step to build and push all images --- docker/Makefile | 7 +++++++ docker/README.md | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docker/Makefile b/docker/Makefile index 0f7f6b21..409ad076 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -1,3 +1,6 @@ +ALL_PYVERSIONS = 3.11-alpine 3.10-alpine 3.9-alpine 3.8-alpine 3.11 3.10 3.9 3.8 + + ifneq (,$(wildcard ./.env)) include .env export @@ -11,3 +14,7 @@ docker-build: docker-push: docker push $(REGISTRY)/$(ORG)/$(IMG):$(TAG) + + +build-all: + $(foreach var,$(ALL_PYVERSIONS), make docker-build docker-push TAG=$(var)-$(PIPENV) PYVERSION=$(var) PIPENV=$(PIPENV);) diff --git a/docker/README.md b/docker/README.md index 231187f0..5cbe0e32 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,6 +1,10 @@ # Public docker images -Build with: +Build all images with: +``` +$ make build-all PIPENV=2023.07.3 +``` +Build a single image with with: ``` $ make docker-build docker-push TAG=3.11-alpine-v2023-6-26 PYVERSION=3.11-alpine PIPENV=2023.6.26