From 2ef164814255b8acacfe36e5905f1b189ec1762a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartal=20L=C3=A6arsson?= Date: Wed, 23 Sep 2026 11:57:22 +0100 Subject: [PATCH] initial commit --- Containerfile | 6 ++++++ justfile | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 Containerfile create mode 100644 justfile diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..50fbee4 --- /dev/null +++ b/Containerfile @@ -0,0 +1,6 @@ +FROM rockylinux:9 + +RUN dnf install -y git vim && dnf clean all + +WORKDIR /opt/scripts +CMD ["bash"] diff --git a/justfile b/justfile new file mode 100644 index 0000000..86fc40d --- /dev/null +++ b/justfile @@ -0,0 +1,38 @@ +container := "scripts-shell" +image := "scripts-shell" + +# Build the container image from Containerfile +build: + podman build -t {{image}} . + +# Start existing container or create if it doesn't exist +up: + podman start {{container}} || just create + +# Create a new detached container +create: + podman run -dit \ + --name {{container}} \ + -v $HOME/repos/shell:/opt/scripts:z \ + {{image}} + +# Open interactive shell in running container +shell: + @podman start {{container}} >/dev/null 2>&1 || true + podman exec -it {{container}} bash + +# Stop container immediately (SIGKILL, no wait) +down: + podman stop -t 0 {{container}} + +# Force-remove container from system +rm: + podman rm -f {{container}} + +# Restart container +restart: + podman restart {{container}} + +# Show container status (running or stopped) +status: + podman ps -a --filter name={{container}}