podman-binexp/shell.sh

16 lines
427 B
Bash
Executable File

#!/bin/sh
# Name of the running container
CONTAINER_NAME="pwner"
# Check if the container is running
if podman ps --filter "name=$CONTAINER_NAME" --format "{{.Names}}" | grep -q "^$CONTAINER_NAME$"; then
# Attach interactively to the container
podman exec -it "$CONTAINER_NAME" /bin/bash
else
echo "Error: Container '$CONTAINER_NAME' is not running." >&2
echo "You can start the container with ./run.sh"
exit 1
fi