WIP: Replace github.com/fsouza/go-dockerclient with github.com/docker/engine-api
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)
Merge request reports
Activity
I think #1584 (closed) will still occur with this change, since you're attaching after starting the container.
- Resolved by Nick Thomas
I would really love us to move away from issuing raw docker commands and instead using
docker-compose
if it's stable enough: https://github.com/docker/libcompose.But this is much, much bigger task. But it will basically reduce complexity of
executor_docker.go
to be a set of createddocker-compose.yml
.Edited by Kamil Trzcińśki- Resolved by Nick Thomas
- Resolved by Nick Thomas
@bkc notes that engine-api/client is already deprecated in favour of github.com/docker/docker/client
fml, etc.
I'm going to start on that in a second branch.
@nick.thomas Should we close this MR in such case?
mentioned in issue #1222 (closed)
@tmaczukin yep, happy with that. Closing in favour of !301 (merged)
This isn't half turning out to be an adventure!