Skip to content

st2web fails in rootless environment #185

Open
@joschi36

Description

@joschi36

To increase security in companies clusters its common practice to run root-less containers. This can be enforced in Kubernetes with PodSecurityPolicies. For instance Openshift clusters have this restrictive policies on by default.

The st2web container however is currently using the library/nginx image which doesn't support to be run as non-root. However, the bitnami/nginx image is doing exactly this to improve security.

I would suggest adopting to bitnami images, as they are often better suited to Kubernetes and since you are already using the bitnami ecosystem.

References:

I've first tried to create a Pull Request over at the st2web repo but had some issues creating the image locally. Also, this is my first try with installing stackstorm in general and also with contributing, so I thought maybe I should create an issue first.

Replacing the images thought shouldn't be very hard as only few directories need to be changed.

Why use a non-root container?

Non-root container images add an extra layer of security and are generally recommended for production environments. However, because they run as a non-root user, privileged tasks are typically off-limits. Learn more about non-root containers in our docs.

from: bitnami/nginx README.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions