-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libcnb-test: Migrate from Bollard to Docker CLI (#621)
Previously libcnb-test ran its various Docker related actions/commands (excluding those handled by Pack CLI) using the bollard crate. Whilst at first glance using a Rust client for Docker seems preferable, it turns out that using Bollard/the Docker daemon API actually has a number of disadvantages, which are explained in more detail in #620. Now: - The Docker CLI is used instead of Bollard+Tokio+the Docker daemon API, which is simpler to understand/maintain and also avoids ~55 additional transitive dependencies. - The `run_shell_command` and `shell_exec` commands are now run as attached `docker run` invocations, making it trivial to check their exit code, fixing #446. - Whenever errors occur, the error output is now easier for end users to understand, since it's presented as Docker CLI output with which they will be more familiar (vs Docker daemon/Bollard API errors). As part of this change, `ContainerConfig::entrypoint` can no longer accept a vector of strings, since the Docker CLI's `--entrypoint` arg only accepts a single value, unlike the Docker daemon API. However, since the purpose of `libcnb-test` is to replicate typical end-user usage of the buildpacks and resultant images, this actually improves alignment of the framework with the use-cases we want to test. Fixes #446. Closes #620. GUS-W-11382688. GUS-W-13853580.
- Loading branch information
Showing
11 changed files
with
540 additions
and
518 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.