Skip to content

Instantly share code, notes, and snippets.

@dduportal
Created September 25, 2023 14:57
Show Gist options
  • Save dduportal/93c49b4ce9fdb4535d599e8bd0f91846 to your computer and use it in GitHub Desktop.
Save dduportal/93c49b4ce9fdb4535d599e8bd0f91846 to your computer and use it in GitHub Desktop.
// Allow the Unix user 'dummy' to access Docker and return its UID
def dockerUserInit() {
sh '''
addgroup docker
usermod -aG docker dummy
chmod 666 /var/run/docker.sock
'''
sh(returnStdout: true, script: 'id -u dummy').trim()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment