add ']' at end of docker_cmd result if starts with [