testcontainers-go icon indicating copy to clipboard operation
testcontainers-go copied to clipboard

feat: create an internal sdk for docker contexts and docker configs

Open mdelapenya opened this issue 7 months ago • 2 comments

  • feat: create a seed for an sdk in the internal package
  • chore: wrap errors
  • chore: use new dockerconfig package instead of cpuguy83's
  • chore: run mod tidy

What does this PR do?

This PR adds two packages into a new internal docker package:

  • context: locates and loads docker contexts from the docker config path.
  • config: locates and reads docker config from the docker config path.

The config package embedes the cpuyguy83's dockercfg package, to have control on the config and auth types.

Why is it important?

Both new packages could represent the seed for an eventual docker-sdk-go package, that would naturally emerge from this internal set of packages.

They are internal in order to iterate faster, and not break clients of testcontainers-go.

Related issues

  • #2810 would benefit from this new context package, so it must be updated to use it instead.

mdelapenya avatar Apr 08 '25 12:04 mdelapenya

Deploy Preview for testcontainers-go ready!

Name Link
Latest commit fab6f0515d7db649517b462d646514ebc709e4d8
Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/6808e05496061a0008482370
Deploy Preview https://deploy-preview-3091--testcontainers-go.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Apr 08 '25 12:04 netlify[bot]

@stevenh I think this PR would be the foundation for the internal SDK in which the work for the new docker client could land.

Can we prioritise this PR if possible?

mdelapenya avatar Apr 20 '25 23:04 mdelapenya