-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2678 from carapace-sh/docker-compose-v2.32.3
docker-compose: updates from v2.32.3
- Loading branch information
Showing
28 changed files
with
191 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/docker" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var alpha_generateCmd = &cobra.Command{ | ||
Use: "generate [OPTIONS] [CONTAINERS...]", | ||
Short: "EXPERIMENTAL - Generate a Compose file from existing containers", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(alpha_generateCmd).Standalone() | ||
|
||
alpha_generateCmd.Flags().String("format", "", "Format the output. Values: [yaml | json]") | ||
alpha_generateCmd.Flags().String("name", "", "Project name to set in the Compose file") | ||
alpha_generateCmd.Flags().String("project-dir", "", "Directory to use for the project") | ||
alphaCmd.AddCommand(alpha_generateCmd) | ||
|
||
carapace.Gen(alpha_generateCmd).FlagCompletion(carapace.ActionMap{ | ||
"format": carapace.ActionValues("yaml", "json"), | ||
"project-dir": carapace.ActionDirectories(), | ||
}) | ||
|
||
carapace.Gen(alpha_generateCmd).PositionalAnyCompletion( | ||
docker.ActionContainers().FilterArgs(), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/docker" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var commitCmd = &cobra.Command{ | ||
Use: "commit [OPTIONS] SERVICE [REPOSITORY[:TAG]]", | ||
Short: "Create a new image from a service container's changes", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(commitCmd).Standalone() | ||
|
||
commitCmd.Flags().StringP("author", "a", "", "Author (e.g., \"John Hannibal Smith <[email protected]>\")") | ||
commitCmd.Flags().StringP("change", "c", "", "Apply Dockerfile instruction to the created image") | ||
commitCmd.Flags().String("index", "", "index of the container if service has multiple replicas.") | ||
commitCmd.Flags().StringP("message", "m", "", "Commit message") | ||
commitCmd.Flags().BoolP("pause", "p", false, "Pause container during commit") | ||
rootCmd.AddCommand(commitCmd) | ||
|
||
carapace.Gen(commitCmd).PositionalCompletion( | ||
docker.ActionRepositoryTags(), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/completers/docker-compose_completer/cmd/action" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var exportCmd = &cobra.Command{ | ||
Use: "export [OPTIONS] SERVICE", | ||
Short: "Export a service container's filesystem as a tar archive", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(exportCmd).Standalone() | ||
|
||
exportCmd.Flags().String("index", "", "index of the container if service has multiple replicas.") | ||
exportCmd.Flags().StringP("output", "o", "", "Write to a file, instead of STDOUT") | ||
rootCmd.AddCommand(exportCmd) | ||
|
||
carapace.Gen(exportCmd).FlagCompletion(carapace.ActionMap{ | ||
"output": carapace.ActionFiles(), | ||
}) | ||
|
||
carapace.Gen(exportCmd).PositionalCompletion( | ||
action.ActionServices(exportCmd), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.