Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jstzd): docker container #559

Open
wants to merge 6 commits into
base: leo/docker-pull-image
Choose a base branch
from

Conversation

ryutamago
Copy link
Collaborator

@ryutamago ryutamago commented Sep 12, 2024

Context

runnable_image create
container

Description

implement the create method on runnable image and docker container

Manually testing the PR

run cargo test --package jstzd

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 51.73913% with 111 lines in your changes missing coverage. Please review.

Project coverage is 35.09%. Comparing base (a6aaa2c) to head (d678a00).
Report is 3 commits behind head on leo/docker-pull-image.

Files with missing lines Patch % Lines
crates/jstzd/src/docker/image.rs 0.00% 39 Missing ⚠️
crates/jstzd/src/docker/container.rs 0.00% 38 Missing ⚠️
crates/jstzd/src/docker/runnable_image.rs 77.77% 31 Missing and 3 partials ⚠️
Files with missing lines Coverage Δ
crates/jstzd/src/docker/runnable_image.rs 84.52% <77.77%> (-6.39%) ⬇️
crates/jstzd/src/docker/container.rs 0.00% <0.00%> (ø)
crates/jstzd/src/docker/image.rs 43.87% <0.00%> (-29.01%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6aaa2c...d678a00. Read the comment docs.

@johnyob johnyob changed the title JSTZD: docker container feat(jstzd): docker container Sep 13, 2024
Comment on lines 36 to 45
pub async fn cleanup(&self) -> Result<()> {
self.stop()
.await
.unwrap_or_else(|e| error!("Error stopping container: {}", e));
match self.client()?.remove_container(&self.id, None).await {
Ok(_) => {}
Err(e) => error!("Error removing container {}: {}", self.id, e),
}
Ok(())
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@zcabter mentioned we should avoid implementing the drop trait for now and leave it as a cleanup function. wdyt? @johnyob

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.

1 participant