Skip to content

Support execution as unprivileged user? #144

Open

Description

@baughj

Hi there,

This is exactly what I was looking for - however, I am trying to run (all of) my gameservers in Kubernetes. Depending on the cluster configuration, you may not even be able to run a container as root. Ideally, you would be able to run the containers with a securityContext enforcing an unprivileged uid. In situations like these, gosu will fail outright.

I think this can be as easy as wrapping exec gosu usage in various places with a function call that basically does:

if [ -z $NO_GOSU ]; then
  exec gosu ...
else
  raw_command
fi

I am happy to submit a PR but wanted to get thoughts on adding this before doing it.

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions