docker-compose: updates from v2.34.0

This commit is contained in:
rsteube 2025-03-14 17:39:59 +01:00
parent 95ebe78178
commit d6f4c7e708
7 changed files with 34 additions and 8 deletions

View File

@ -14,7 +14,9 @@ var alpha_publishCmd = &cobra.Command{
func init() {
carapace.Gen(alpha_publishCmd).Standalone()
alpha_publishCmd.Flags().String("oci-version", "", "OCI Image/Artifact specification version (automatically determined by default)")
alpha_publishCmd.Flags().String("oci-version", "", "OCI image/artifact specification version (automatically determined by default)")
alpha_publishCmd.Flags().Bool("resolve-image-digests", false, "Pin image tags to digests")
alpha_publishCmd.Flags().Bool("with-env", false, "Include environment variables in the published OCI artifact")
alpha_publishCmd.Flags().BoolP("yes", "y", false, "Assume \"yes\" as answer to all prompts")
alphaCmd.AddCommand(alpha_publishCmd)
}

View File

@ -18,6 +18,6 @@ func init() {
alpha_vizCmd.Flags().String("indentation-size", "", "Number of tabs or spaces to use for indentation")
alpha_vizCmd.Flags().Bool("networks", false, "Include service's attached networks in output graph")
alpha_vizCmd.Flags().Bool("ports", false, "Include service's exposed ports in output graph")
alpha_vizCmd.Flags().Bool("spaces", false, "If given, space character ' ' will be used to indent,")
alpha_vizCmd.Flags().Bool("spaces", false, "If given, space character ' ' will be used to indent")
alphaCmd.AddCommand(alpha_vizCmd)
}

View File

@ -24,7 +24,7 @@ func init() {
createCmd.Flags().Bool("quiet-pull", false, "Pull without printing progress information")
createCmd.Flags().Bool("remove-orphans", false, "Remove containers for services not defined in the Compose file")
createCmd.Flags().StringSlice("scale", []string{}, "Scale SERVICE to NUM instances. Overrides the `scale` setting in the Compose file if present.")
createCmd.Flags().BoolP("y", "y", false, "Assume \"yes\" as answer to all prompts and run non-interactively")
createCmd.Flags().BoolP("yes", "y", false, "Assume \"yes\" as answer to all prompts and run non-interactively")
rootCmd.AddCommand(createCmd)
carapace.Gen(createCmd).FlagCompletion(carapace.ActionMap{

View File

@ -17,7 +17,7 @@ func init() {
lsCmd.Flags().BoolP("all", "a", false, "Show all stopped Compose projects")
lsCmd.Flags().String("filter", "", "Filter output based on conditions provided")
lsCmd.Flags().String("format", "", "Format the output. Values: [table | json]")
lsCmd.Flags().BoolP("quiet", "q", false, "Only display IDs")
lsCmd.Flags().BoolP("quiet", "q", false, "Only display project names")
rootCmd.AddCommand(lsCmd)
carapace.Gen(lsCmd).FlagCompletion(carapace.ActionMap{

View File

@ -0,0 +1,22 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var publishCmd = &cobra.Command{
Use: "publish [OPTIONS] REPOSITORY[:TAG]",
Short: "Publish compose application",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(publishCmd).Standalone()
publishCmd.Flags().String("oci-version", "", "OCI image/artifact specification version (automatically determined by default)")
publishCmd.Flags().Bool("resolve-image-digests", false, "Pin image tags to digests")
publishCmd.Flags().Bool("with-env", false, "Include environment variables in the published OCI artifact")
publishCmd.Flags().BoolP("yes", "y", false, "Assume \"yes\" as answer to all prompts")
rootCmd.AddCommand(publishCmd)
}

View File

@ -23,6 +23,7 @@ func init() {
runCmd.Flags().BoolP("detach", "d", false, "Run container in background and print container ID")
runCmd.Flags().String("entrypoint", "", "Override the entrypoint of the image")
runCmd.Flags().StringSliceP("env", "e", []string{}, "Set environment variables")
runCmd.Flags().StringSlice("env-from-file", []string{}, "Set environment variables from file")
runCmd.Flags().BoolP("interactive", "i", false, "Keep STDIN open even if not attached")
runCmd.Flags().StringSliceP("label", "l", []string{}, "Add or override a label")
runCmd.Flags().String("name", "", "Assign a name to the container")
@ -44,9 +45,10 @@ func init() {
// TODO flag completion
carapace.Gen(runCmd).FlagCompletion(carapace.ActionMap{
"env": env.ActionNameValues(false),
"pull": carapace.ActionValues("always", "missing", "never").StyleF(style.ForKeyword),
"volume": action.ActionVolumes(runCmd),
"env": env.ActionNameValues(false),
"env-from-file": carapace.ActionFiles(),
"pull": carapace.ActionValues("always", "missing", "never").StyleF(style.ForKeyword),
"volume": action.ActionVolumes(runCmd),
})
carapace.Gen(runCmd).PositionalCompletion(

View File

@ -43,7 +43,7 @@ func init() {
upCmd.Flags().Bool("wait", false, "Wait for services to be running|healthy. Implies detached mode.")
upCmd.Flags().String("wait-timeout", "", "Maximum duration in seconds to wait for the project to be running|healthy")
upCmd.Flags().BoolP("watch", "w", false, "Watch source code and rebuild/refresh containers when files are updated.")
upCmd.Flags().BoolP("y", "y", false, "Assume \"yes\" as answer to all prompts and run non-interactively")
upCmd.Flags().BoolP("yes", "y", false, "Assume \"yes\" as answer to all prompts and run non-interactively")
rootCmd.AddCommand(upCmd)
carapace.Gen(upCmd).FlagCompletion(carapace.ActionMap{