mirror of
https://github.com/spaytac/orbiter.git
synced 2026-01-21 23:44:41 +00:00
Fix docker client calls
This commit is contained in:
parent
ad6ccde1bb
commit
03b903a00d
@ -59,7 +59,7 @@ func (c *DaemonCmd) Run(args []string) int {
|
|||||||
go func() {
|
go func() {
|
||||||
counter := 0
|
counter := 0
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
dockerClient, _ := client.NewEnvClient()
|
dockerClient, _ := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
|
||||||
for {
|
for {
|
||||||
<-timer1.C
|
<-timer1.C
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ func Autodetect(core *Core) error {
|
|||||||
|
|
||||||
func autoDetectSwarmMode(c *Core) {
|
func autoDetectSwarmMode(c *Core) {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
dockerClient, err := client.NewEnvClient()
|
dockerClient, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.WithField("error", err).Debug("Problem communication with Docker")
|
logrus.WithField("error", err).Debug("Problem communication with Docker")
|
||||||
return
|
return
|
||||||
|
|||||||
@ -19,7 +19,7 @@ type SwarmProvider struct {
|
|||||||
|
|
||||||
func NewSwarmProvider(c map[string]string) (autoscaler.Provider, error) {
|
func NewSwarmProvider(c map[string]string) (autoscaler.Provider, error) {
|
||||||
var p autoscaler.Provider
|
var p autoscaler.Provider
|
||||||
client, err := docker.NewEnvClient()
|
client, err := docker.NewClientWithOpts(docker.FromEnv, docker.WithAPIVersionNegotiation())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.WithField("error", err).Warn("problem to communicate with docker")
|
logrus.WithField("error", err).Warn("problem to communicate with docker")
|
||||||
return p, err
|
return p, err
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user