mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-31 14:13:09 +02:00
Rebased from main: Old CPU / Old docker version compatibility
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"github.com/bytedance/sonic"
|
||||
"github.com/moby/moby/api/types/container"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/docker/docker/api/types/container"
|
||||
"github.com/yusing/ds/ordered"
|
||||
"github.com/yusing/godoxy/internal/agentpool"
|
||||
gperr "github.com/yusing/goutils/errs"
|
||||
@@ -11,7 +12,7 @@ import (
|
||||
type (
|
||||
LabelMap = map[string]any
|
||||
|
||||
PortMapping = map[int]container.PortSummary
|
||||
PortMapping = map[int]container.Port
|
||||
Container struct {
|
||||
DockerCfg DockerProviderConfig `json:"docker_cfg"`
|
||||
Image *ContainerImage `json:"image"`
|
||||
@@ -69,5 +70,5 @@ func (e *ContainerError) Unwrap() error {
|
||||
|
||||
func (e *ContainerError) MarshalJSON() ([]byte, error) {
|
||||
err := e.errs.Error().(gperr.PlainError)
|
||||
return sonic.Marshal(string(err.Plain()))
|
||||
return json.Marshal(string(err.Plain()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user