diff --git a/images/synadm/Dockerfile b/images/synadm/Dockerfile deleted file mode 100644 index 0a200d700a3c7c25d2d304cf9afd2b46f8609fbb..0000000000000000000000000000000000000000 --- a/images/synadm/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM docker.io/library/python:3 - -COPY requirements.txt . - -RUN true \ - && pip3 install -r requirements.txt \ - && mkdir -p /workspace \ - && true - - -WORKDIR /workspace -ENTRYPOINT ["/usr/local/bin/synadm"] diff --git a/images/synadm/Earthfile b/images/synadm/Earthfile index 381b0bb050ed32205b1796800798545de1513d7b..9d9d8eb332171fc73e4d769175234e960744bf0d 100644 --- a/images/synadm/Earthfile +++ b/images/synadm/Earthfile @@ -1,15 +1,28 @@ VERSION 0.7 +container-interal: + FROM docker.io/library/python:3 + COPY requirements.txt . + RUN pip3 install -r requirements.txt + RUN mkdir -p /workspace + WORKDIR /workspace + ENTRYPOINT ["/usr/local/bin/synadm"] + container: FROM ../mirror+alpine ARG registry=quay.io/shivering-isles/synadm COPY .release ./ ARG tag=$(awk -F'=' '$1 == "release" {print $2}' .release) ARG latest=false - FROM DOCKERFILE --platform=linux/amd64 -f "./Dockerfile" "./" + FROM +container-interal IF [ $latest = "true" ] SAVE IMAGE --push ${registry}:latest ELSE LABEL "quay.expires-after"="12w" END - SAVE IMAGE --push ${registry}:${tag} \ No newline at end of file + SAVE IMAGE --push ${registry}:${tag} + +install: + BUILD +container + LOCALLY + RUN install -m 755 ./synadm ~/bin/synadm \ No newline at end of file diff --git a/images/synadm/Makefile b/images/synadm/Makefile deleted file mode 100644 index 9020ce9a50553a79dec5007646ee83fc8173994e..0000000000000000000000000000000000000000 --- a/images/synadm/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -.DEFAULT_GOAL := help - -include ../.utils/container-build.mk -include ../../utils/help.mk - -.PHONY: preflight -preflight: - # Check for required tools - command -v podman > /dev/null - -.PHONY: install -install: preflight build ## Install koolbox, the Kubernetes Toolbox for SI-Infrastructure - install -m 755 ./synadm ~/bin/synadm diff --git a/images/synadm/README.md b/images/synadm/README.md index 9dd1697bc0a34f167912faa0799500db14336e22..abe974dcb13cbd5db091022189dd4a17e397e475 100644 --- a/images/synadm/README.md +++ b/images/synadm/README.md @@ -14,6 +14,6 @@ Installation In order to install it, you just build the container yourself and get a neat little shell script installed in `~/bin/` ``` -make install REGISTRY_HOST=quay.io USERNAME=shivering-isles +earthly +install synadm --help ```