feat(docker): add Docker socket proxy support and related configurations

- Introduced Docker socket proxy handling in the agent.
- Added environment variables for Docker socket configuration.
- Implemented new Docker handler with endpoint permissions based on environment settings.
- Added tests for Docker handler functionality.
- Updated go.mod to include gorilla/mux for routing.
This commit is contained in:
yusing
2025-05-08 20:59:32 +08:00
parent 8424fd9f1a
commit 455a85e6a0
9 changed files with 701 additions and 7 deletions

View File

@@ -82,10 +82,12 @@ func GetEnv[T any](key string, defaultValue T, parser func(string) (T, error)) T
return defaultValue
}
func stringstring(s string) (string, error) {
return s, nil
}
func GetEnvString(key string, defaultValue string) string {
return GetEnv(key, defaultValue, func(s string) (string, error) {
return s, nil
})
return GetEnv(key, defaultValue, stringstring)
}
func GetEnvBool(key string, defaultValue bool) bool {