remove hard-coded uid 1000
This commit is contained in:
parent
95fe3e3cc3
commit
d9867471a4
@ -15,8 +15,8 @@ spec:
|
||||
app.kubernetes.io/name: credentials
|
||||
spec:
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
runAsUser: {{ APP_USER_ID }}
|
||||
runAsGroup: {{ APP_USER_ID }}
|
||||
containers:
|
||||
- name: credentials
|
||||
image: {{ CREDENTIALS_DOCKER_IMAGE }}
|
||||
|
||||
@ -111,7 +111,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
&& apt install -y libxml2 libmysqlclient-dev media-types mailcap
|
||||
|
||||
# From then on, run as unprivileged "app" user
|
||||
ARG APP_USER_ID=1000
|
||||
ARG APP_USER_ID={{ HOST_USER_ID }}
|
||||
RUN if [ "$APP_USER_ID" = 0 ]; then echo "app user may not be root" && false; fi
|
||||
RUN useradd --home-dir /openedx --create-home --shell /bin/bash --uid ${APP_USER_ID} app
|
||||
USER ${APP_USER_ID}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user