26 lines
547 B
Plaintext
Executable File
26 lines
547 B
Plaintext
Executable File
#!/usr/bin/env -S just --working-directory . --justfile
|
|
|
|
image := "ghcr.io/jswank/alpine-cli:latest"
|
|
n := "cli"
|
|
|
|
# run
|
|
default: run
|
|
|
|
# run a temporary container based on {{image}}
|
|
@run:
|
|
podman run -ti --rm {{image}}
|
|
|
|
# run (or attach to) a perisent container {{n}}
|
|
persist:
|
|
#!/bin/sh
|
|
if [ $(podman ps --all --filter name="{{n}}" -q | wc -l) -gt 0 ]; then
|
|
podman start -i -a {{n}}
|
|
else
|
|
podman run -ti --name {{n}} ghcr.io/jswank/alpine-cli:latest
|
|
fi
|
|
|
|
# remove the persistent image
|
|
clean:
|
|
@ podman rm -f {{n}} >/dev/null 2>&1
|
|
|