feat: support build Dockerfile from current dir (#2021)

This commit is contained in:
Kevin Wan
2022-06-18 18:32:07 +08:00
committed by GitHub
parent 86d70317bf
commit 9eea311a4d
3 changed files with 29 additions and 10 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}} {{.GoMainFrom}}
FROM {{.BaseImage}}