I noticed that building the examples would produce a client with the
default ("Go-http-client/1.1") User-Agent; this is something to look
into (probably should have a saner default), but regardless, it's
good practice to set your own;
- Update examples to show setting the User-Agent
- Use "log.Fatal" instead of "panic"; both exit the binary, but
probably are slightly more readable.
- Use the authconfig.Encode utility, which codifies the canonical
format to encode the JSON, so that users don't have to replicate
the same format.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
## Summary
Added documentation for DOCKER_HOST requirement when using Docker SDKs
with Docker Desktop for Linux.
## Changes
- Added "Using Docker SDKs with Docker Desktop" section to Linux install
docs explaining why SDKs need DOCKER_HOST set and providing
configuration commands
- Added FAQ entry "How do I use Docker SDKs with Docker Desktop for
Linux?" with troubleshooting steps
- Added note in SDK reference docs alerting Docker Desktop for Linux
users to set DOCKER_HOST before using SDKs
Fixes#23308
---
🤖 Generated with [cagent](https://github.com/docker/cagent)
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: aevesdocker <allie.sadler@docker.com>