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

Error: container has runAsNonRoot and image will run as root #107

Open
hirannair opened this issue Jul 10, 2021 · 6 comments
Open

Error: container has runAsNonRoot and image will run as root #107

hirannair opened this issue Jul 10, 2021 · 6 comments
Labels
kind/feature New feature or request

Comments

@hirannair
Copy link

hirannair commented Jul 10, 2021

Im getting the below error while trying to run localizer

We have a PodSecurityPolicy set in our clusters - “RunasNonRootUser”

I think the pod is failing to run because it does not have any RunAsUser set.

Below are the errors.

NAME                                            READY   STATUS                       RESTARTS   AGE
localizer-finacle-limits-nch2w                  0/1     CreateContainerConfigError   0          106s
Events:
  Type     Reason     Age               From               Message
  ----     ------     ----              ----               -------
  Normal   Scheduled  54s               default-scheduler  Successfully assigned fin-acceptance/localizer-finacle-limits-nch2w
 to node-24
  Normal   Pulling    6s (x5 over 53s)  kubelet            Pulling image "linuxserver/openssh-server"
  Normal   Pulled     5s (x5 over 48s)  kubelet            Successfully pulled image "linuxserver/openssh-server"
  Warning  Failed     5s (x5 over 48s)  kubelet            Error: container has runAsNonRoot and image will run as root
@jaredallard jaredallard added the kind/feature New feature or request label Jul 10, 2021
@jaredallard
Copy link
Contributor

It'd be nice to have the images be ran as non-root. I'll see if I can get this added, but I can't give a firm timeline at the moment!

@hirannair
Copy link
Author

Thanks @jaredallard

@hirannair
Copy link
Author

@jaredallard Thanks for adding this as a feature.Can you please provide some instructions on how to get the build running locally.I have updated the code to run the pod as non root user in my fork,but not able to get the build working.

@jaredallard
Copy link
Contributor

@jaredallard Thanks for adding this as a feature.Can you please provide some instructions on how to get the build running locally.I have updated the code to run the pod as non root user in my fork,but not able to get the build working.

Should just be make, what are you running into?

@hirannair
Copy link
Author

@jaredallard getting the below error

$ make
Error: open .versions.devbase: no such file or directory
Makefile:4: .bootstrap/root/Makefile: No such file or directory
make: *** No rule to make target '.bootstrap/root/Makefile'.  Stop.

@hirannair
Copy link
Author

@jaredallard Ignore that.One of my colleague got it working.All good now

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

No branches or pull requests

2 participants