chore: refine docker for better compatible with package main (#1944)

* chore: refine docker for better compatible with package main

* chore: default to current dir on goctl docker command
This commit is contained in:
Kevin Wan
2022-05-30 13:26:58 +08:00
committed by GitHub
parent 3fbe0f87b7
commit 289a325757
4 changed files with 11 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ ADD go.sum .
RUN go mod download
COPY . .
{{if .Argument}}COPY {{.GoRelPath}}/etc /app/etc
{{end}}RUN go build -ldflags="-s -w" -o /app/{{.ExeFile}} {{.GoRelPath}}/{{.GoFile}}
{{end}}RUN go build -ldflags="-s -w" -o /app/{{.ExeFile}} {{.GoRelPath}}
FROM {{.BaseImage}}