diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..848baf2 --- /dev/null +++ b/Containerfile @@ -0,0 +1,8 @@ +FROM fedora:latest + +COPY . jirate +RUN cd jirate && dnf -y install python3-pip nano && pip install --user -r requirements.txt . + +# TODO: Switch to venv + +ENTRYPOINT ["/root/.local/bin/jirate"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9018556 --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +all: container-build jirate-c + +container-build: + podman images | grep '^localhost/jirate' && echo "Please remove existing image: podman image rm localhost/jirate" && false + podman build . -t jirate + +jirate-c: jirate-c.in + cat $^ > $@ + chmod +x $@ + +clean: + # Note: doesn't destroy the container image + rm -f jirate-c diff --git a/jirate-c.in b/jirate-c.in new file mode 100644 index 0000000..0a31b7c --- /dev/null +++ b/jirate-c.in @@ -0,0 +1,3 @@ +#!/bin/bash +podman images | grep -q '^localhost/jirate' || exit 1 +podman run -it --rm --mount type=bind,src=$HOME/.jirate.json,dst=/root/.jirate.json,ro,relabel=shared jirate $*