Skip to content

Commit 2869401

Browse files
committed
fix(golang): install gcc so that apps can build with c extensions
1 parent a47f6b0 commit 2869401

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/runtime/generate_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ ENTRYPOINT ["node"]`,
229229
{
230230
handler: "pkg/list/main.go",
231231
wantFwriter: `FROM golang:alpine
232-
RUN apk add --no-cache git
232+
RUN apk add --no-cache git gcc g++ make
233233
RUN go install github.com/asalkeld/CompileDaemon@master`,
234234
},
235235
}

pkg/runtime/golang.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (t *golang) FunctionDockerfileForCodeAsConfig(w io.Writer) error {
128128
return err
129129
}
130130

131-
con.Run(dockerfile.RunOptions{Command: []string{"apk", "add", "--no-cache", "git"}})
131+
con.Run(dockerfile.RunOptions{Command: []string{"apk", "add", "--no-cache", "git", "gcc", "g++", "make"}})
132132
con.Run(dockerfile.RunOptions{Command: []string{"go", "install", "github.com/asalkeld/CompileDaemon@master"}})
133133

134134
_, err = w.Write([]byte(strings.Join(con.Lines(), "\n")))

0 commit comments

Comments
 (0)