WIP: Replace github.com/fsouza/go-dockerclient with github.com/docker/engine-api

Closed Nick Thomas requested to merge nick.thomas/gitlab-ci-multi-runner:1606-use-engine-api into master

Helper methods that have changed considerably with the switch:

  • ContainerAttach
  • ContainerLogs
  • ImageImport
  • ImagePull

I'm not sure about the authentication for ImagePull, in particular.

The docker configuration reading code in go-dockerclient was inlined into helpers/docker/auth_config.go. Would love suggestions on how to get away from that.

Two sites in executor_docker.go now construct fake types.Container members with incomplete information (just ID and Name specified). Changing the slices that these are stored in to only hold the id might clean this up. engine-api/client.ContainerInspect returns types.ContainerJSON instead of types.Container, and there isn't a trivial way to convert between the two AFAICT.

Several 'streaming' sites (ContainerLogs, ImageImport) have had consumers open-coded into them, and I'm not sure these are sensible.

Other than that, it's clearly awesome. Thoughts, @ayufan, @tmaczukin?

Closes #1606 (closed)