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