From 398b2be01a933254921b413e9a66c97fa7bb8c46 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Wed, 24 Aug 2022 11:59:44 +0200 Subject: [PATCH] terraform image --- terraform/Dockerfile | 5 +++++ terraform/Makefile | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 terraform/Dockerfile create mode 100644 terraform/Makefile diff --git a/terraform/Dockerfile b/terraform/Dockerfile new file mode 100644 index 0000000..0d1f198 --- /dev/null +++ b/terraform/Dockerfile @@ -0,0 +1,5 @@ +FROM alpine:3.16 + +RUN apk add --no-cache terraform + +ENTRYPOINT ["terraform"] diff --git a/terraform/Makefile b/terraform/Makefile new file mode 100644 index 0000000..fd7f3bc --- /dev/null +++ b/terraform/Makefile @@ -0,0 +1,24 @@ +IMG_NAME=terraform +REGISTRY=registry.monotremata.xyz +IMG=$(REGISTRY)/$(IMG_NAME) +PLATFORMS=linux/amd64,linux/arm64 + +.PHONY: push buildx clean + +out/image-id: Dockerfile + mkdir -p $(@D) + docker build -t $(IMG) . + echo $(IMG) > $@ + +push: out/image-id + docker image push $(IMG) + +buildx: Dockerfile + docker buildx build \ + --platform $(PLATFORMS) \ + --tag $(IMG) \ + --push \ + . + +clean: + rm -rf out