Skip to content

Conversation

@TomBurdge
Copy link
Contributor

@TomBurdge TomBurdge commented Apr 21, 2025

Changes

  • Create non-docker CLI functionality to create a docker image from scratch - using this example.
  • Pull and export to directory docker images with bollard.
  • Add bollard, tokio, and some other crates to dockpack-core.
  • Make dock_pack main function async, so that it can use refactored execute_docker_build function.

Non-Feature Changes/chores

  • Add pre-commit hooks.
  • Make clippy changes/ignore them (see unsafe clippy lint ignore).

Next Steps

  • Use the bollard push API to push the built image to remote registry (gradually building up auth configuration support).
  • Small re-factoring to remove use of deprecated components of the bollard API (I think it's non-deprecated in current release, and hence the docs, but depcrecated in the pre-release, which is being used here) - now flagged by clippy.
  • Potentially re-factor errors to not be a string - I'd like to get up to speed with using anyhow, which seems pretty standard. Returning just strings on errors got a bit confusing at one point, when developing.

This PR will probably be easiest to review when filtering out the chore: listen to clippy in the git diff (these are mostly formatting/clippy recommended changes).

@TomBurdge TomBurdge changed the title Dockpack push Add bollard async build to dockpack push Apr 21, 2025
@TomBurdge TomBurdge changed the title Add bollard async build to dockpack push Perform dockpack push & pull with bollard crate Apr 22, 2025
.write_all(&data)
.await
.map_err(|err| err.to_string())?;
archive_file
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxwellflitton
Is the sync_all method actually needed here?

I found the exact details of what this method is doing a little confusing in the docs.

test_unpack_files_from_image still passes without it. But the method only really checks that the process ends without an error.

@maxwellflitton maxwellflitton merged commit da893b1 into maxwellflitton:main May 3, 2025
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