Skip to content

Commit cf9bf72

Browse files
LinuxSuRenzhaoxiaojie
andauthored
fix: platform cannot be empty for the dockerfile (#8)
Co-authored-by: zhaoxiaojie <zhaoxiaojie@ailinking.com>
1 parent 699beb6 commit cf9bf72

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
/dist/
3-
/Dockerfile
3+
/Dockerfile
4+
.idea/

runtime/golang.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ func (d *Golang) GenerateDockerfile(path string) ([]byte, error) {
9696

9797
var golangTemplate = strings.TrimSpace(`
9898
ARG VERSION={{.Version}}
99+
ARG BUILDPLATFORM=linux
99100
FROM --platform=${BUILDPLATFORM} golang:${VERSION} AS base
100101
WORKDIR /go/src/app
101102
ARG TARGETOS=linux

0 commit comments

Comments
 (0)