Added default base image + New layout for displaying options

This commit is contained in:
Faissal Elamraoui
2016-12-23 11:53:02 +01:00
parent 4ea1715df6
commit 040b160ecd
2 changed files with 5 additions and 12 deletions

View File

@ -74,7 +74,7 @@ var (
func init() {
fs := flag.NewFlagSet("dockerize", flag.ContinueOnError)
fs.StringVar(&baseImage, "image", "", "Sets the base image of the Docker container.")
fs.StringVar(&baseImage, "image", "library/golang", "Set the base image of the Docker container.")
fs.StringVar(&expose, "expose", "8080", "Port(s) to expose in the Docker container.")
cmdDockerize.Flag = *fs
}
@ -90,10 +90,6 @@ func dockerizeApp(cmd *Command, args []string) int {
dir, err := filepath.Abs(".")
MustCheck(err)
if len(baseImage) == 0 {
baseImage = "library/golang:latest"
}
appdir := strings.Replace(dir, gopath, "", 1)
// In case of multiple ports to expose inside the container,