Replace io.Copy with stdcopy.StdCopy for docker output handling

Merged Tomasz Maczukin requested to merge fix/docker-executor-output-attaching into master

What does this MR do?

Replaces io.Copy() with github.com/docker/docker/pkg/stdcopy.StdCopy() while handling docker output.

Why was this MR needed?

Fixes regression introduced with !301 (merged). Please read https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/merge_requests/301#note_24583712 for a reference.

Thanks @ayufan for pointing to this function :)

Are there points in the code the reviewer needs to double check?

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

What are the relevant issue numbers?