fix: sanitize container name in test script
Replace : and / with - to comply with Docker container naming rules. The colon in image:tag format is invalid in container names.
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
IMAGE="${1:?Usage: test.sh <image>}"
|
IMAGE="${1:?Usage: test.sh <image>}"
|
||||||
CONTAINER_NAME="test-$(basename "$IMAGE")-$$"
|
CONTAINER_NAME="test-$(echo "$IMAGE" | tr ':/' '-')-$$"
|
||||||
PASSED=0
|
PASSED=0
|
||||||
FAILED=0
|
FAILED=0
|
||||||
TOTAL=0
|
TOTAL=0
|
||||||
|
|||||||
Reference in New Issue
Block a user