use {{image}} in perisistent recipe

This commit is contained in:
Jason Swank 2023-03-16 12:28:54 -04:00
parent a20258eff4
commit 007e667c5b

View File

@ -10,13 +10,13 @@ default: run
@run: @run:
podman run -ti --rm {{image}} podman run -ti --rm {{image}}
# run (or attach to) a perisent container {{n}} # run (or attach to) a persistent container {{n}}
persist: persist:
#!/bin/sh #!/bin/sh
if [ $(podman ps --all --filter name="{{n}}" -q | wc -l) -gt 0 ]; then if [ $(podman ps --all --filter name="{{n}}" -q | wc -l) -gt 0 ]; then
podman start -i -a {{n}} podman start -i -a {{n}}
else else
podman run -ti --name {{n}} ghcr.io/jswank/alpine-cli:latest podman run -ti --name {{n}} {{image}}{
fi fi
# remove the persistent image # remove the persistent image