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

Add functions useful for interacting with docker images and building remote images #1062

Merged
merged 4 commits into from
Feb 15, 2022

Conversation

yorinasub17
Copy link
Contributor

This PR introduces a few functions that are useful for interacting with docker images, and building remote images:

  • ListImages for listing images in the docker daemon
  • DeleteImage for cleaning up images in the docker daemon
  • DoesImageExist for checking whether a given image exists in the daemon
  • GitCloneAndBuild for building a docker image from a remote git repo

denis256
denis256 previously approved these changes Feb 11, 2022
Copy link
Member

@denis256 denis256 left a comment

Choose a reason for hiding this comment

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

I was wondering if will make sense to add an additional function to explicitly pull image, it may be helpful in cases when we have latest tag and want to avoid caching locally.

@@ -60,3 +64,23 @@ func TestBuildWithTarget(t *testing.T) {
out := Run(t, tag, &RunOptions{Remove: true})
require.Contains(t, out, text1)
}

func TestGitCloneAndBuild(t *testing.T) {
Copy link
Member

@denis256 denis256 Feb 11, 2022

Choose a reason for hiding this comment

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

t.Parallel() is missing by intention?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah good catch! Was not intentional. Added in! 443f3f8

@yorinasub17
Copy link
Contributor Author

Thanks for review! Build failures are unrelated to this change, so will go ahead and merge this in.

@yorinasub17 yorinasub17 merged commit a231e83 into master Feb 15, 2022
@yorinasub17 yorinasub17 deleted the feature/docker-images-functions branch February 15, 2022 23:01
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