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

Helper function: bind docker socket #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lucymhdavies
Copy link

WIP. I wanna add tests for this before I consider it good, but wanted some feedback on the api.

e.g. this seems like something which should probably be a method of DockerClient rather than Task, which means I should also move Bind to be a method of DockerClient.

(Task is already a DockerClient, so wouldn't be a breaking change)

lucymhdavies pushed a commit to LMHD/lucli that referenced this pull request Jun 9, 2018
lucymhdavies pushed a commit to LMHD/lucli that referenced this pull request Jun 9, 2018
@@ -89,3 +89,19 @@ func (t *Task) Bind(src, dst string) (string, error) {
}
return fmt.Sprintf("%s:%s", expanded, dst), nil
}

// BindDockerSocket is a utility function which binds the docker socket
func (t *Task) BindDockerSocket() error {
Copy link
Author

Choose a reason for hiding this comment

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

Might want to call this AddBindDockerSocket, to align with Bind and AddBind.

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