Add cleanup before container creation

This commit is contained in:
R.Y.A.N 2025-03-09 01:21:21 +01:00
parent 70b62ddc90
commit 17268e6e0d
Signed by: R.Y.A.N
GPG Key ID: 3BD93EABD1407B82

View File

@ -1,4 +1,12 @@
#!/bin/sh
#
function terminate_and_remove() {
echo Cleaning old container...
podman stop creatures-buildenv
podman rm creatures-buildenv
}
podman container exists creatures-buildenv && terminate_and_remove
toolbox create --image code.helloryan.se/creatures/buildenv/combined-amd64-fedora-41:latest creatures-buildenv