docker: Error response from daemon: service endpoint with name {randomName} already exists.
batch was fail every 4~5 times per day
all of fail reason are same.
docker: Error response from daemon: service endpoint with name {randomName} already exists. |
common error alarm make developer insensitive batch fail.
root cause of above error is docker bridge network connection is still connected even docker container removed.
for long term, we should check why bridge connection is alive even docker container removed. but batch slave is used by several team.
It is difficult to clarify which team batch makes above issue.
So, i decided to assign docker name to clarify vendor batch make zoombie bridge connection or not and to escape random name already exist error.
bash shell for generate container name
runningTimeStamp=`/bin/date +%Y%m%d%H%M%S` jobName="$JOB_NAME" containerName="$jobName-$runningTimeStamp"
docker run --name $containerName ..... |