diff --git a/tools/goctl/docker/docker.go b/tools/goctl/docker/docker.go index 3859697a6b0f..e4629f69ebc1 100644 --- a/tools/goctl/docker/docker.go +++ b/tools/goctl/docker/docker.go @@ -170,7 +170,7 @@ func generateDockerfile(goFile, base string, port int, version, timezone string, t := template.Must(template.New("dockerfile").Parse(text)) return t.Execute(out, Docker{ Chinese: env.InChina(), - GoMainFrom: path.Join(projPath, goFile), + GoMainFrom: path.Join(projPath, filepath.Base(goFile)), GoRelPath: projPath, GoFile: goFile, ExeFile: exeName,