Last active
April 16, 2020 23:03
-
-
Save 1206yaya/9621a9dab6a21af67cf7e1f408d1c923 to your computer and use it in GitHub Desktop.
JenkinsでDockerをつかえるように
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jenkins/jenkins:lts | |
# Install plugins | |
COPY ./plugins.txt /usr/share/jenkins/ref/plugins.txt | |
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt | |
USER root | |
RUN apt-get update | |
##### Docker install START >>> | |
# 前提ソフトウェアのインストール | |
RUN apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common | |
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - | |
RUN apt-key fingerprint 0EBFCD88 | |
RUN add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/debian \ | |
$(lsb_release -cs) \ | |
stable" | |
RUN apt-get update | |
RUN apt-get install -y docker-ce docker-ce-cli containerd.io | |
RUN usermod -g docker jenkins | |
USER jenkins | |
##### <<< Docker install END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment