commit 2ef164814255b8acacfe36e5905f1b189ec1762a Author: Bartal Læarsson Date: Wed Sep 23 11:57:22 2026 +0100 initial commit 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}}