Skip to content

Commit 5cb1df2

Browse files
committed
Run tekton containers as nonroot
1 parent 8bc424d commit 5cb1df2

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.ko.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
defaultBaseImage: gcr.io/distroless/static:nonroot
12
baseImageOverrides:
23
github.com/tektoncd/pipeline/cmd/creds-init: gcr.io/tekton-nightly/github.com/tektoncd/pipeline/build-base:latest
34
github.com/tektoncd/pipeline/cmd/git-init: gcr.io/tekton-nightly/github.com/tektoncd/pipeline/build-base:latest
4-
github.com/tektoncd/pipeline/cmd/entrypoint: busybox # image must have `cp` in $PATH
5+
github.com/tektoncd/pipeline/cmd/entrypoint: gcr.io/distroless/base:debug-nonroot # image must have `cp` in $PATH

config/controller.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ spec:
5656

5757
# These images are pulled from Dockerhub, by digest, as of April 15, 2020.
5858
"-nop-image", "tianon/true@sha256:009cce421096698832595ce039aa13fa44327d96beedb84282a69d3dbcf5a81b",
59-
"-shell-image", "busybox@sha256:a2490cec4484ee6c1068ba3a05f89934010c85242f736280b35343483b2264b6",
6059
"-gsutil-image", "google/cloud-sdk@sha256:6e8676464c7581b2dc824956b112a61c95e4144642bec035e6db38e3384cae2e",
60+
# As of April 17, 2020
61+
"-shell-image", "gcr.io/distroless/base:debug-nonroot@sha256:85d7c26e8a98f910dca4c556bf2fee8a0c88df63f8f6692c84be92331c3c3169",
6162
]
6263
volumeMounts:
6364
- name: config-logging

images/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ FROM alpine:latest
33
RUN apk add --update git openssh-client \
44
&& apk update \
55
&& apk upgrade
6+
7+
USER 65532

0 commit comments

Comments
 (0)