Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run docker container as non privileged user (node with UID 1000?) #107

Open
cbugneac-nex opened this issue Apr 28, 2023 · 1 comment
Open
Assignees
Labels
feature New feature

Comments

@cbugneac-nex
Copy link

Is your feature request related to a problem? Please describe.
At the moment docker image runs as root user which is not good from security perspective.

Describe the solution you'd like
Run docker container at leas as built-in node user with UID 1000.

Describe alternatives you've considered
Build custom image which is not great idea.

Additional context
Want to run this image in K8s as non root.

@cbugneac-nex cbugneac-nex added the feature New feature label Apr 28, 2023
@locustbaby
Copy link

docker run -d -p 3000:80 --user 1000 ealen/echo-server:0.8.10
I tried to run the docker with user 1000, it worked, so I think it should also work in k8s, maybe like this

apiVersion: v1
kind: Pod
metadata:
  name: my-pod
spec:
  containers:
    - name: my-container
      image: my-image
      securityContext:
        runAsUser: 1000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

3 participants