anchor.diff:  retry_running_env_up_script_until(ProjectRoot, AppmockRoot, CmRoot,
       LogsDir, DescriptionFile, RetriesNumber) ->
   
  -    StartLog =run_env_up_script(ProjectRoot, AppmockRoot, CmRoot, LogsDir, DescriptionFile),
  +    StartLog = run_env_up_script(ProjectRoot, AppmockRoot, CmRoot, LogsDir, DescriptionFile),
   
       case StartLog of
           <<"">> ->
  +            Ids = string:tokens(string:strip(os:cmd(
  +                "docker ps -aq"
  +            ), right, $\n), "\n"),
  +            MasterId = string:strip(os:cmd(
  +                "docker ps -a | grep testmaster | awk '{print $1}'"
  +            ), right, $\n),
  +            remove_dockers(ProjectRoot, lists:delete(MasterId, Ids)),
  +
  +
               % if env_up.py failed, output will be empty,
               % because stderr is redirected to prepare_test_environment.log
               case RetriesNumber > 0 of
  
positive.code:     end,
  
      Dockers = lists_utils:key_get(docker_ids, Config, []),
      ProjectRoot = ?config(project_root, Config),
      DockersStr = lists:map(fun atom_to_list/1, Dockers),
      CleanupScript =
          filename:join([ProjectRoot, "bamboos", "docker", "cleanup.py"]),
      utils:cmd([CleanupScript | DockersStr]),
  
      case StopStatus of
          ok ->
  
negative.code:     EnvDescriptionRelativePath = ?config(?ENV_DESCRIPTION, Config, ?DEFAULT_ENV_DESCRIPTION),
      ?TEST_FILE(Config, EnvDescriptionRelativePath).
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  %% Removes docker containers.
  %% @end
  %%--------------------------------------------------------------------
  -spec remove_dockers(string(), list(string())) -> string().
  remove_dockers(ProjectRoot, DockerIds) ->
      CleanupScript =
          filename:join([ProjectRoot, "bamboos", "docker", "cleanup.py"]),
      utils:cmd([CleanupScript | DockerIds]).
  