FROM jenkins/jenkins:alpine USER 0 ARG DOCKERGID=998 # Docker RUN apk -U update && apk add docker-cli # Setup users and groups RUN addgroup -g ${DOCKERGID} docker RUN addgroup jenkins docker USER 1000