Skip to content

Commit 7ca9c9d

Browse files
authored
pkg/scaffold/build_dockerfile: update base image (#697)
Alpine 3.6 is an old image and may contains security vulnerabilities or otherwise be out of date. For our default generated dockerfile, we should try to remain up to date and also update the image's packages in case a vulnerability was fixed in the repos, but not the image
1 parent 28cecad commit 7ca9c9d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pkg/scaffold/build_dockerfile.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ func (s *Dockerfile) GetInput() (input.Input, error) {
3434
return s.Input, nil
3535
}
3636

37-
const dockerfileTmpl = `FROM alpine:3.6
37+
const dockerfileTmpl = `FROM alpine:3.8
38+
39+
RUN apk upgrade --update --no-cache
3840
3941
USER nobody
4042

pkg/scaffold/build_dockerfile_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ func TestDockerfile(t *testing.T) {
3131
}
3232
}
3333

34-
const dockerfileExp = `FROM alpine:3.6
34+
const dockerfileExp = `FROM alpine:3.8
35+
36+
RUN apk upgrade --update --no-cache
3537
3638
USER nobody
3739

0 commit comments

Comments
 (0)