diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md index d2763a917f7498e4c23cb418b6992ed07332d651..8ca74d20ee4e2c9240dc26ffb1a40914a8de1e68 100644 --- a/docs/src/SUMMARY.md +++ b/docs/src/SUMMARY.md @@ -36,6 +36,7 @@ - [Dovecot](images/dovecot.md) - [Koolbox](images/koolbox.md) - [Postfix](images/postfix.md) + - [synadm](images/synadm.md) --- diff --git a/docs/src/images/synadm.md b/docs/src/images/synadm.md new file mode 120000 index 0000000000000000000000000000000000000000..442d54c870f344052b7d572d74f296919deb9473 --- /dev/null +++ b/docs/src/images/synadm.md @@ -0,0 +1 @@ +../../../images/synadm/README.md \ No newline at end of file diff --git a/images/.utils/gitlab-ci.yaml b/images/.utils/gitlab-ci.yaml index 1711d669159fa4f5563fd48dbb1b12a1da7367e9..970f793c0ec93f79d8a185871a4e19e5e0af8f59 100644 --- a/images/.utils/gitlab-ci.yaml +++ b/images/.utils/gitlab-ci.yaml @@ -5,6 +5,7 @@ - dovecot - postfix - koolbox + - synadm container-build: diff --git a/images/synadm/.release b/images/synadm/.release new file mode 100644 index 0000000000000000000000000000000000000000..85f180f38cd7bb8259cfadf2e12bfde62fc8f99d --- /dev/null +++ b/images/synadm/.release @@ -0,0 +1 @@ +release=0.1.0 diff --git a/images/synadm/Dockerfile b/images/synadm/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..29d6bcda3823ad460f0be91cbe5fdb3a7c44fcf3 --- /dev/null +++ b/images/synadm/Dockerfile @@ -0,0 +1,10 @@ +FROM docker.io/library/python:3 + +RUN true \ + && pip3 install synadm \ + && mkdir -p /workspace \ + && true + + +WORKDIR /workspace +ENTRYPOINT ["/usr/local/bin/synadm"] diff --git a/images/synadm/Makefile b/images/synadm/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..9020ce9a50553a79dec5007646ee83fc8173994e --- /dev/null +++ b/images/synadm/Makefile @@ -0,0 +1,13 @@ +.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 new file mode 100644 index 0000000000000000000000000000000000000000..9dd1697bc0a34f167912faa0799500db14336e22 --- /dev/null +++ b/images/synadm/README.md @@ -0,0 +1,19 @@ +Synadm +=== + +Simple container providing the [synadm](https://github.com/JOJ0/synadm) CLI with nicely isolated from the system. + +Requirements +--- + +Have podman installed. And in best case running [Fedora Workstation](https://getfedora.org/en/workstation/) or [Silverblue](https://silverblue.fedoraproject.org/). + +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 +synadm --help +``` diff --git a/images/synadm/synadm b/images/synadm/synadm new file mode 100755 index 0000000000000000000000000000000000000000..3655871d924532bc4571f0585c0c83b35b044646 --- /dev/null +++ b/images/synadm/synadm @@ -0,0 +1,12 @@ +#!/bin/bash + +set -x + +XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}" + +SYNADM_CONFIG_HOME="${XDG_CONFIG_HOME}/synadm" + +mkdir -p "$SYNADM_CONFIG_HOME" +touch "$SYNADM_CONFIG_HOME/synadm.yaml" + +podman run -it --rm -v "${SYNADM_CONFIG_HOME}:/root/.config/:z" quay.io/shivering-isles/synadm:latest $@