Skip to content

Commit 1e9d8a6

Browse files
committed
use fixed user id instead of username
1 parent 57511e4 commit 1e9d8a6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

charts/tidb-operator/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ operator:
4848

4949
# SecurityContext is security config of this component, it will set template.spec.securityContext
5050
# Refer to https://kubernetes.io/docs/tasks/configure-pod-container/security-context
51-
securityContext: {}
51+
securityContext:
52+
runAsNonRoot: true
5253
# runAsUser: 1000
5354
# runAsGroup: 2000
5455
# fsGroup: 2000

image/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ FROM --platform=$TARGETPLATFORM ghcr.io/pingcap-qe/bases/pingcap-base:v1.10.0@sh
2929

3030
ARG TARGETPLATFORM
3131

32-
USER pingcap:pingcap
32+
USER 1001:1001
3333

3434
WORKDIR /
3535

@@ -41,7 +41,7 @@ FROM --platform=$TARGETPLATFORM ghcr.io/pingcap-qe/bases/pingcap-base:v1.10.0@sh
4141

4242
ARG TARGETPLATFORM
4343

44-
USER pingcap:pingcap
44+
USER 1001:1001
4545

4646
WORKDIR /
4747

@@ -53,7 +53,7 @@ FROM --platform=$TARGETPLATFORM ghcr.io/pingcap-qe/bases/pingcap-base:v1.10.0@sh
5353

5454
ARG TARGETPLATFORM
5555

56-
USER pingcap:pingcap
56+
USER 1001:1001
5757

5858
WORKDIR /
5959

@@ -67,7 +67,7 @@ FROM --platform=$TARGETPLATFORM ghcr.io/pingcap-qe/bases/pingcap-base:v1.10.0@sh
6767

6868
ARG TARGETPLATFORM
6969

70-
USER pingcap:pingcap
70+
USER 1001:1001
7171

7272
WORKDIR /
7373

0 commit comments

Comments
 (0)