remove hard-coded uid 1000
This commit is contained in:
parent
95fe3e3cc3
commit
d9867471a4
@ -15,8 +15,8 @@ spec:
|
|||||||
app.kubernetes.io/name: credentials
|
app.kubernetes.io/name: credentials
|
||||||
spec:
|
spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 1000
|
runAsUser: {{ APP_USER_ID }}
|
||||||
runAsGroup: 1000
|
runAsGroup: {{ APP_USER_ID }}
|
||||||
containers:
|
containers:
|
||||||
- name: credentials
|
- name: credentials
|
||||||
image: {{ CREDENTIALS_DOCKER_IMAGE }}
|
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
|
&& apt install -y libxml2 libmysqlclient-dev media-types mailcap
|
||||||
|
|
||||||
# From then on, run as unprivileged "app" user
|
# 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 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
|
RUN useradd --home-dir /openedx --create-home --shell /bin/bash --uid ${APP_USER_ID} app
|
||||||
USER ${APP_USER_ID}
|
USER ${APP_USER_ID}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user