Skip to content

Commit

Permalink
fix: platform cannot be empty for the dockerfile (#8)
Browse files Browse the repository at this point in the history
Co-authored-by: zhaoxiaojie <[email protected]>
  • Loading branch information
LinuxSuRen and zhaoxiaojie authored May 17, 2024
1 parent 699beb6 commit cf9bf72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
/dist/
/Dockerfile
/Dockerfile
.idea/
1 change: 1 addition & 0 deletions runtime/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ func (d *Golang) GenerateDockerfile(path string) ([]byte, error) {

var golangTemplate = strings.TrimSpace(`
ARG VERSION={{.Version}}
ARG BUILDPLATFORM=linux
FROM --platform=${BUILDPLATFORM} golang:${VERSION} AS base
WORKDIR /go/src/app
ARG TARGETOS=linux
Expand Down

0 comments on commit cf9bf72

Please sign in to comment.