mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
feat(libstack): remove the docker-compose binary BE-10801 (#111)
Co-authored-by: andres-portainer <andres-portainer@users.noreply.github.com> Co-authored-by: oscarzhou <oscar.zhou@portainer.io>
This commit is contained in:
parent
55aa0c0c5d
commit
a7127bc74f
34 changed files with 913 additions and 761 deletions
|
@ -2,6 +2,8 @@ package libstack
|
|||
|
||||
import (
|
||||
"context"
|
||||
|
||||
configtypes "github.com/docker/cli/cli/config/types"
|
||||
)
|
||||
|
||||
type Deployer interface {
|
||||
|
@ -10,7 +12,7 @@ type Deployer interface {
|
|||
//
|
||||
// projectName or filePaths are required
|
||||
// if projectName is supplied filePaths will be ignored
|
||||
Remove(ctx context.Context, projectName string, filePaths []string, options Options) error
|
||||
Remove(ctx context.Context, projectName string, filePaths []string, options RemoveOptions) error
|
||||
Pull(ctx context.Context, filePaths []string, options Options) error
|
||||
Run(ctx context.Context, filePaths []string, serviceName string, options RunOptions) error
|
||||
Validate(ctx context.Context, filePaths []string, options Options) error
|
||||
|
@ -51,6 +53,7 @@ type Options struct {
|
|||
ProjectDir string
|
||||
// ConfigOptions is a list of options to pass to the docker-compose config command
|
||||
ConfigOptions []string
|
||||
Registries []configtypes.AuthConfig
|
||||
}
|
||||
|
||||
type DeployOptions struct {
|
||||
|
@ -60,7 +63,8 @@ type DeployOptions struct {
|
|||
// This is useful when running a onetime task.
|
||||
//
|
||||
// When this is set, docker compose will output its logs to stdout
|
||||
AbortOnContainerExit bool ``
|
||||
AbortOnContainerExit bool
|
||||
RemoveOrphans bool
|
||||
}
|
||||
|
||||
type RunOptions struct {
|
||||
|
@ -72,3 +76,9 @@ type RunOptions struct {
|
|||
// Run the container in detached mode
|
||||
Detached bool
|
||||
}
|
||||
|
||||
type RemoveOptions struct {
|
||||
Options
|
||||
|
||||
Volumes bool
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue