Skip to content

Commit dcc4f94

Browse files
authored
Merge pull request #77 from legendu-net/dev
Merge dev into main
2 parents 0a27a3e + 95dfea3 commit dcc4f94

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cmd/ldc.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ func ldc(cmd *cobra.Command, args []string) {
117117
"--hostname",
118118
getDockerImageHostname(args[0]),
119119
}
120+
if utils.GetBoolFlag(cmd, "docker-in-docker") {
121+
command = append(command, "-v", "/var/run/docker.sock:/var/run/docker.sock")
122+
}
120123
cwd := utils.Getwd()
121124
command = append(command, "-v", cwd+":/workdir")
122125
home := utils.UserHomeDir()
@@ -159,6 +162,7 @@ func init() {
159162
ldcCmd.Flags().StringP("password", "P", "", "The default password for the user (to create in the Docker container).")
160163
ldcCmd.Flags().StringSlice("extra-port-mappings", []string{}, "Extra port mappings.")
161164
ldcCmd.Flags().BoolP("mount-home", "m", false, "Mount /home on the host as /home_host in the Docker container.")
165+
ldcCmd.Flags().Bool("docker-in-docker", false, "Mount docker.sock to allow running Docker in Docker containers.")
162166
ldcCmd.Flags().Bool("dry-run", false, "Print out the docker command without running it.")
163167
rootCmd.AddCommand(ldcCmd)
164168
}

cmd/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
// Update icon.
1010
func version(cmd *cobra.Command, args []string) {
11-
fmt.Println("0.19.2")
11+
fmt.Println("0.20.0")
1212
}
1313

1414
var versionCmd = &cobra.Command{

0 commit comments

Comments
 (0)