Skip to content

Conversation

@stepchowfun
Copy link
Owner

Switch back to using the Docker CLI rather than the Docker API.

This is needed to work around fussybeaver/bollard#113, and it's is motivated more generally by my desire to switch away from Bollard for the following reasons:

  • There are occasional bugs that cause Docuum to not work (fix type of BuildCache CreatedAt and LastUsedAt fussybeaver/bollard#89, Docker::events not receiving events from Docker? fussybeaver/bollard#113), and I don't have the time to debug these issues. I've already spent too much time dealing with issues related to this. (Bollard is a great project, but I am only willing to use battle-tested dependencies for high availability.)
  • I actually trust the Docker CLI to be more stable than the API, even though the API is versioned and the CLI is not. Everyone uses and understands the Docker CLI, and countless shell scripts around the world depend on it.
  • For debugging purposes, it's easier to reproduce what Docuum does if Docuum simply runs the Docker CLI.

Unfortunately, there is one thing that was better about the Docker API: the image list RPC gave us the parent IDs of the images, whereas docker image ls appears incapable of doing so. Since v0.13.0, Docuum needs this parent-child info in order to determine an effective order for deleting images based on the dependencies between them. This means Docker now has to query for the parent of each image individually, which is slow. I have implemented logic to cache this parent-child information so we can avoid recomputing it on every run, but that means this diff is unfortunately quite large.

cc @mdonoughe @juliahw

Status: Ready

Fixes: N/A

@stepchowfun stepchowfun force-pushed the remove-bollard branch 9 times, most recently from cd038e7 to 81fba2c Compare October 9, 2020 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants