[PR #178] [MERGED] feat: docker over tls #176

Closed
opened 2025-12-29 09:23:47 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/yusing/godoxy/pull/178
Author: @yusing
Created: 12/23/2025
Status: Merged
Merged: 12/23/2025
Merged by: @yusing

Base: mainHead: feat/docker-over-tls


📝 Commits (5)

  • f40e3a8 feat(docker): support docker provider tls config; update container handling to use DockerProviderConfig
  • 8cef6ed fix(config): correct deserialization
  • 6066c3c refactor(docker): rename docker provider config protocol to scheme
  • 644db93 refactor(types): remove unnecessary TLSConfig.BuildTLSConfig() method
  • 60f8c9f refactor(docker): enhance validation; move tls config to the same file and rename to DockerTLSConfig

📊 Changes

25 files changed (+308 additions, -81 deletions)

View changed files

📝 internal/api/v1/docker/container.go (+3 -3)
📝 internal/api/v1/docker/logs.go (+3 -3)
📝 internal/api/v1/docker/restart.go (+2 -2)
📝 internal/api/v1/docker/start.go (+2 -2)
📝 internal/api/v1/docker/stop.go (+2 -2)
📝 internal/config/state.go (+2 -2)
📝 internal/config/types/config.go (+7 -7)
📝 internal/docker/client.go (+12 -2)
📝 internal/docker/container.go (+11 -11)
📝 internal/docker/container_test.go (+3 -2)
📝 internal/docker/id_lookup.go (+8 -7)
📝 internal/docker/list_containers.go (+3 -2)
📝 internal/idlewatcher/provider/docker.go (+3 -3)
📝 internal/idlewatcher/watcher.go (+2 -2)
📝 internal/route/provider/docker.go (+8 -7)
📝 internal/route/provider/docker_labels_test.go (+2 -1)
📝 internal/route/provider/docker_test.go (+5 -4)
📝 internal/route/provider/provider.go (+7 -5)
📝 internal/route/route.go (+2 -2)
📝 internal/types/docker.go (+4 -4)

...and 5 more files

📄 Description

Note

Introduces TLS-capable Docker connectivity and replaces plain host strings with structured configs across the codebase.

  • Add types.DockerProviderConfig and types.TLSConfig; support YAML as string or detailed form with file checks
  • Change Providers.Docker to map[string]DockerProviderConfig and update validation; NewDockerProvider and agent provider adapt
  • Update docker.NewClient to accept DockerProviderConfig and use TLS when provided; client sharing/clone updated
  • Replace container host usage with DockerCfg in types.Container, idlewatcher DockerConfig, and all call sites
  • Switch ID-to-host map to ID-to-config (Get/Set/DeleteDockerCfgByContainerID)
  • Migrate route/provider, watcher (events/health), and idlewatcher to pass config; logs/inspect/start/stop/restart APIs now use config and expose server as cfg.URL
  • Adjust hostname/port resolution using config URL; tests and helpers updated accordingly

Written by Cursor Bugbot for commit 644db930c0. This will update automatically on new commits. Configure here.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/yusing/godoxy/pull/178 **Author:** [@yusing](https://github.com/yusing) **Created:** 12/23/2025 **Status:** ✅ Merged **Merged:** 12/23/2025 **Merged by:** [@yusing](https://github.com/yusing) **Base:** `main` ← **Head:** `feat/docker-over-tls` --- ### 📝 Commits (5) - [`f40e3a8`](https://github.com/yusing/godoxy/commit/f40e3a8ed638a6cbd129b58f1ea82de0d21e434c) feat(docker): support docker provider tls config; update container handling to use DockerProviderConfig - [`8cef6ed`](https://github.com/yusing/godoxy/commit/8cef6edb0cbd7b4599e46c5ed11663c6d17b927f) fix(config): correct deserialization - [`6066c3c`](https://github.com/yusing/godoxy/commit/6066c3cdff3dde5fd4d2b5b2160d68e4f94256f4) refactor(docker): rename docker provider config `protocol` to `scheme` - [`644db93`](https://github.com/yusing/godoxy/commit/644db930c0c681cddef3e7db6f5fe1baab074b0a) refactor(types): remove unnecessary TLSConfig.BuildTLSConfig() method - [`60f8c9f`](https://github.com/yusing/godoxy/commit/60f8c9f10fec7e5e706c85b79ac33fda5e45409b) refactor(docker): enhance validation; move tls config to the same file and rename to DockerTLSConfig ### 📊 Changes **25 files changed** (+308 additions, -81 deletions) <details> <summary>View changed files</summary> 📝 `internal/api/v1/docker/container.go` (+3 -3) 📝 `internal/api/v1/docker/logs.go` (+3 -3) 📝 `internal/api/v1/docker/restart.go` (+2 -2) 📝 `internal/api/v1/docker/start.go` (+2 -2) 📝 `internal/api/v1/docker/stop.go` (+2 -2) 📝 `internal/config/state.go` (+2 -2) 📝 `internal/config/types/config.go` (+7 -7) 📝 `internal/docker/client.go` (+12 -2) 📝 `internal/docker/container.go` (+11 -11) 📝 `internal/docker/container_test.go` (+3 -2) 📝 `internal/docker/id_lookup.go` (+8 -7) 📝 `internal/docker/list_containers.go` (+3 -2) 📝 `internal/idlewatcher/provider/docker.go` (+3 -3) 📝 `internal/idlewatcher/watcher.go` (+2 -2) 📝 `internal/route/provider/docker.go` (+8 -7) 📝 `internal/route/provider/docker_labels_test.go` (+2 -1) 📝 `internal/route/provider/docker_test.go` (+5 -4) 📝 `internal/route/provider/provider.go` (+7 -5) 📝 `internal/route/route.go` (+2 -2) 📝 `internal/types/docker.go` (+4 -4) _...and 5 more files_ </details> ### 📄 Description <!-- CURSOR_SUMMARY --> > [!NOTE] > Introduces TLS-capable Docker connectivity and replaces plain host strings with structured configs across the codebase. > > - Add `types.DockerProviderConfig` and `types.TLSConfig`; support YAML as string or detailed form with file checks > - Change `Providers.Docker` to `map[string]DockerProviderConfig` and update validation; `NewDockerProvider` and agent provider adapt > - Update `docker.NewClient` to accept `DockerProviderConfig` and use TLS when provided; client sharing/clone updated > - Replace container host usage with `DockerCfg` in `types.Container`, idlewatcher `DockerConfig`, and all call sites > - Switch ID-to-host map to ID-to-config (`Get/Set/DeleteDockerCfgByContainerID`) > - Migrate route/provider, watcher (events/health), and idlewatcher to pass config; logs/inspect/start/stop/restart APIs now use config and expose `server` as `cfg.URL` > - Adjust hostname/port resolution using config URL; tests and helpers updated accordingly > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 644db930c0c681cddef3e7db6f5fe1baab074b0a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 09:23:47 +01:00
adam closed this issue 2025-12-29 09:23:47 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/godoxy#176