feat: container name can be specified when run

This commit is contained in:
Ian
2026-10-05 09:02:39 +02:00
parent 92e09fe29c
commit b168025ba1
+2 -1
View File
@@ -3,6 +3,7 @@ set -euo pipefail
IMAGE_REPO="${IMAGE_REPO:-localhost/opencode-dev}" IMAGE_REPO="${IMAGE_REPO:-localhost/opencode-dev}"
IMAGE="${IMAGE_REPO}" IMAGE="${IMAGE_REPO}"
CONTAINER_NAME="${CONTAINER_NAME:-opencode-dev}"
if ! podman image exists "$IMAGE"; then if ! podman image exists "$IMAGE"; then
echo "Image $IMAGE does not exist. Build it first with ./build.sh" >&2 echo "Image $IMAGE does not exist. Build it first with ./build.sh" >&2
@@ -31,7 +32,7 @@ mkdir -p \
ARGS=( ARGS=(
run --rm -it run --rm -it
--name opencode-dev --name "${CONTAINER_NAME}"
--user dev --user dev
--userns=keep-id --userns=keep-id
--network=default --network=default