Fix to run several containerized CCP instances.

Currently it is not possible to run several containerized CCP instances
e.g. when you would like to check status while images are building.
Reason - name 'fuel-ccp' was used for all executed containers and
docker forbids to create 2 containers with the same name.

Adding random suffix to prevent name coinsidence.

Change-Id: I368739b5249c251d9e7fb27e2967b4bc42c41c96
This commit is contained in:
Dmitry Klenov 2017-02-17 14:06:07 +00:00
parent fd6ac7ef8b
commit 980412c95f
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
alias ccp='docker run --rm -t -i --name=fuel-ccp --network=host \
alias ccp='docker run --rm -t -i --network=host \
--name=fuel-ccp-`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 5 | head -n 1` \
-v ~/:/home/`whoami`/ -v /var/run/docker.sock:/var/run/docker.sock \
-e LOCAL_USER_ID=`id -u $USER` -e LOCAL_USER_NAME=`whoami` \
fuel-ccp:latest'