ddev

package
v0.83.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "ddev",
	Short: "Run sikalabs/dev in Docker",
	Args:  cobra.NoArgs,
	Run: func(c *cobra.Command, args []string) {
		currentWorkDir, err := os.Getwd()
		if err != nil {
			log.Fatal(err)
		}

		cmdArgs := []string{
			"run",
			"--name", "dev-" + strconv.Itoa(time_utils.Unix()),
			"--rm", "-ti",
		}
		if FlagVolume {
			cmdArgs = append(
				cmdArgs,
				"-w", currentWorkDir,
				"-v", currentWorkDir+":"+currentWorkDir,
			)
		}
		cmdArgs = append(
			cmdArgs,
			FlagImage,
			FlagShell,
		)
		cmd := exec.Command("docker", cmdArgs...)
		cmd.Stdout = os.Stdout
		cmd.Stderr = os.Stderr
		cmd.Stdin = os.Stdin
		cmd.Run()
	},
}
View Source
var FlagHostNetwork bool
View Source
var FlagImage string
View Source
var FlagShell string
View Source
var FlagVolume bool

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL