From 904cb09858f68391b9b470cf3bf7d81adb0500d6 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Thu, 27 Oct 2016 11:37:03 -0400 Subject: [PATCH] dockcross: Change name of container from "dockcross" to "dockcross_RAND" where RAND is a 7 characters long randomly generated alphanumeric string. Note that container name can NOT start with "_", only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed See #50 --- imagefiles/dockcross | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imagefiles/dockcross b/imagefiles/dockcross index 1edb446..d6a0758 100755 --- a/imagefiles/dockcross +++ b/imagefiles/dockcross @@ -180,7 +180,7 @@ fi # Now, finally, run the command in a container # tty -s && TTY_ARGS=-ti || TTY_ARGS= -CONTAINER_NAME=dockcross +CONTAINER_NAME=dockcross_$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 7 | head -n 1) docker run $TTY_ARGS --name $CONTAINER_NAME \ -v $PWD:/work \ $USER_IDS \