terraform image

Ricard Illa 2022-08-24 11:59:44 +02:00
parent c1554f21b5
commit 398b2be01a
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
2 changed files with 29 additions and 0 deletions

5
terraform/Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM alpine:3.16
RUN apk add --no-cache terraform
ENTRYPOINT ["terraform"]

24
terraform/Makefile Normal file
View File

@ -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