add EXPOSE in dockerfile generation (#281)

This commit is contained in:
Kevin Wan
2020-12-12 08:18:01 +08:00
committed by GitHub
parent b56cc8e459
commit 4d13dda605
3 changed files with 38 additions and 37 deletions

View File

@@ -33,7 +33,9 @@ ENV TZ Asia/Shanghai
WORKDIR /app
COPY --from=builder /app/{{.ExeFile}} /app/{{.ExeFile}}
{{if .HasArgs}}COPY --from=builder /app/etc /app/etc
{{if .HasArgs}}COPY --from=builder /app/etc /app/etc{{end}}
{{if .HasPort}}
EXPOSE {{.Port}}
{{end}}
CMD ["./{{.ExeFile}}"{{.Argument}}]
`