From 6d8109d9a07231bed952340ac049625aa723c2ff Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Mon, 22 Aug 2022 12:20:17 +0200 Subject: [PATCH] static page builder for ci --- static-page-builder/Dockerfile | 15 +++++++++++++++ static-page-builder/Makefile | 19 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 static-page-builder/Dockerfile create mode 100644 static-page-builder/Makefile diff --git a/static-page-builder/Dockerfile b/static-page-builder/Dockerfile new file mode 100644 index 0000000..0e9ca8c --- /dev/null +++ b/static-page-builder/Dockerfile @@ -0,0 +1,15 @@ +# maybe switch to a stable version of alpine once tidyhtml is avaiblable there +FROM alpine:edge + +# py3-pip is only needed to install j2cli, but python3 and py3-setuptools are +# also needed to run it +RUN apk add --no-cache \ + findutils \ + make \ + py3-pip \ + py3-setuptools \ + python3 \ + sassc \ + tidyhtml && \ + pip install j2cli[yaml] && \ + apk del py3-pip diff --git a/static-page-builder/Makefile b/static-page-builder/Makefile new file mode 100644 index 0000000..2694506 --- /dev/null +++ b/static-page-builder/Makefile @@ -0,0 +1,19 @@ +IMG_NAME=static-page-builder +REGISTRY=registry.monotremata.xyz +IMG=$(REGISTRY)/$(IMG_NAME) +PLATFORMS=linux/amd64,linux/arm64 + +.PHONY: build push buildx + +build: Dockerfile + docker build -t $(IMG) . + +push: build + docker image push $(IMG) + +buildx: Dockerfile + docker buildx build \ + --platform $(PLATFORMS) \ + --tag $(IMG) \ + --push \ + .