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

Expose the logic to process Docker Context outside the internal package #2113

Closed
1 task
jjbustamante opened this issue Apr 1, 2024 · 0 comments · Fixed by #2117
Closed
1 task

Expose the logic to process Docker Context outside the internal package #2113

jjbustamante opened this issue Apr 1, 2024 · 0 comments · Fixed by #2117
Assignees
Labels
status/ready Issue ready to be worked on. type/enhancement Issue that requests a new feature or improvement.
Milestone

Comments

@jjbustamante
Copy link
Member

jjbustamante commented Apr 1, 2024

Description

With pack 0.31.0 we added support for reading the configuration from the docker context and set the environment variables required by pack accordingly. That logic was added into the internal package which means it can't be reuse by the community who uses pack as library.

Double checking this code, I think it is save if we move it outside the internal package, in that case, end-uses can decide to call the method before creating a pack client if they want.

Currently the way we create a pack client can be checked here

Proposed solution

Move the files: internal/docker/context.go and internal/docker/context_test.go to pkg/client

Describe alternatives you've considered

I thought on moving the context processing method inside the client.NewClient method, in this way it will simplify the pack client creation process.

Additional context

  • This feature should be documented somewhere
@jjbustamante jjbustamante added type/enhancement Issue that requests a new feature or improvement. status/triage Issue or PR that requires contributor attention. status/ready Issue ready to be worked on. and removed status/triage Issue or PR that requires contributor attention. labels Apr 1, 2024
@jjbustamante jjbustamante added this to the 0.34.0 milestone Apr 3, 2024
@jjbustamante jjbustamante self-assigned this Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/ready Issue ready to be worked on. type/enhancement Issue that requests a new feature or improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant