Skip to content
Snippets Groups Projects
Commit 24dfcef1 authored by Danylo Vanin (EPAM)'s avatar Danylo Vanin (EPAM) Committed by Mikhail Piatliou (EPAM)
Browse files

[GONRG-7389] Moved bootstrap to non-root

parent 5b690c37
No related branches found
No related tags found
2 merge requests!744Upgraded packages to mitigated vulns in netty, guava, snakeyaml,!722[GONRG-7389] Moved bootstrap to non-root
......@@ -38,5 +38,8 @@ spec:
- secretRef:
name: {{ .Values.conf.bootstrapSecretName | quote }}
{{- end }}
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
serviceAccountName: {{ .Values.data.bootstrapServiceAccountName | quote }}
{{- end }}
......@@ -16,5 +16,10 @@ RUN apt-get update \
&& chmod +x download-data.sh \
&& chmod +x bootstrap_storage.sh \
&& ./download-data.sh
RUN groupadd -g 10001 -r nonroot \
&& useradd -d /opt -g 10001 -r -u 10001 nonroot
RUN chown -R 10001:10001 /opt
USER 10001:10001
CMD ["/bin/bash", "-c", "/opt/bootstrap_storage.sh && sleep 365d"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment