1
votes

Setup my first pipeline using Jenkin's Ocean Blue on a EC2 RHEL 8 instance and when attempting to run docker commands (such as as docker pull maven:3.6.2-jdk-14) as the jenkins user the following error is always returned No subuid ranges found for user "jenkins" in /etc/subuid

From a bit of research it seems I need to add the jenkins user to /etc/subuid and /etc/subgid but I'm unsure how to do this or what to add. Any help will be much appreciated.

1
You are more likely to get help for issues like this on unix.stackexchange.com or serverfault.comomajid

1 Answers

2
votes

What version of docker are you using? Is it really docker or podman? As far as I know, podman is the default container engine on RHEL 8. It sounds like you are using that, because the error mentions subuid, and that's only used when running as non-root.

The man page pretty much tells you what to do:

Or just add the content manually.

$ echo USERNAME:10000:65536 >> /etc/subuid
$ echo USERNAME:10000:65536 >> /etc/subgid

So just replace USERNAME with jenkins and you should be good to go. Run the following as root:

echo jenkins:10000:65536 >> /etc/subuid
echo jenkins:10000:65536 >> /etc/subgid