Skip to content
This repository was archived by the owner on Jun 26, 2023. It is now read-only.

Commit e157486

Browse files
committed
docker-compose binary is now compose plugin in v2
1 parent 2e0f60d commit e157486

File tree

4 files changed

+1
-320
lines changed

4 files changed

+1
-320
lines changed

compose/compose.go

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,12 @@
11
package compose
22

33
import (
4-
"log"
5-
64
libstack "github.com/portainer/docker-compose-wrapper"
7-
"github.com/portainer/docker-compose-wrapper/compose/errors"
8-
"github.com/portainer/docker-compose-wrapper/compose/internal/composebinary"
95
"github.com/portainer/docker-compose-wrapper/compose/internal/composeplugin"
106
)
117

128
// NewComposeDeployer will try to create a wrapper for docker-compose binary
139
// if it's not availbale it will try to create a wrapper for docker-compose plugin
1410
func NewComposeDeployer(binaryPath, configPath string) (libstack.Deployer, error) {
15-
deployer, err := composebinary.NewComposeWrapper(binaryPath, configPath)
16-
if err == nil {
17-
return deployer, nil
18-
}
19-
20-
if err == errors.ErrBinaryNotFound {
21-
log.Printf("[INFO] [compose] [message: binary is missing, falling-back to compose plugin] [error: %s]", err)
22-
return composeplugin.NewPluginWrapper(binaryPath, configPath)
23-
}
24-
25-
return nil, err
11+
return composeplugin.NewPluginWrapper(binaryPath, configPath)
2612
}

compose/internal/composebinary/composebinary.go

Lines changed: 0 additions & 163 deletions
This file was deleted.

compose/internal/composebinary/composebinary_test.go

Lines changed: 0 additions & 138 deletions
This file was deleted.

compose/internal/composebinary/docker-compose-test.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)