Expose the logic to process Docker Context outside the internal package #2113
Labels
status/ready
Issue ready to be worked on.
type/enhancement
Issue that requests a new feature or improvement.
Milestone
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
andinternal/docker/context_test.go
topkg/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
The text was updated successfully, but these errors were encountered: