feat: container name can be specified when run
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user