diff --git a/Dockerfile b/Dockerfile index 9fe2a3e..96f3c9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,6 +37,9 @@ WORKDIR /app COPY ./web /app/web COPY --from=builder --chown=nonroot:nonroot /app/dashboard /app/dashboard +RUN adduser -u 1000 --disabled-password --gecos "" --no-create-home nonroot +USER nonroot + ENTRYPOINT ["/app/dashboard"] -CMD ["-in-cluster=true"] \ No newline at end of file +CMD ["-in-cluster=true"] diff --git a/charts/app-dashboard/Chart.yaml b/charts/app-dashboard/Chart.yaml index 04264c7..586902e 100644 --- a/charts/app-dashboard/Chart.yaml +++ b/charts/app-dashboard/Chart.yaml @@ -27,7 +27,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 1.0.7 +version: 1.0.8 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/app-dashboard/templates/deployment.yaml b/charts/app-dashboard/templates/deployment.yaml index 782247c..f283bf0 100644 --- a/charts/app-dashboard/templates/deployment.yaml +++ b/charts/app-dashboard/templates/deployment.yaml @@ -43,6 +43,8 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "app-dashboard.serviceAccountName" . }} + securityContext: + runAsUser: 1000 containers: - name: {{ .Chart.Name }} securityContext: