FROM jenkins
USER root
RUN apt-get update -y
RUN apt-get install apt-transport-https ca-certificates curl software-properties-common -y
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable"
RUN apt-get update -y
RUN apt-get install docker-ce -y
RUN usermod -a -G docker jenkins
RUN echo "jenkins ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN echo "alias docker='sudo docker'" >> /etc/profile.d/custom_global_commands.sh
RUN echo "sudo chown root:docker /run/docker.sock" >> /etc/profile.d/custom_global_commands.sh
USER jenkins
Created
December 25, 2017 07:51
-
-
Save nezarfadle/7f9819f658a62886b59d5e418681db67 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment