mirror of
https://github.com/pikami/sysadmin.git
synced 2024-11-25 13:15:45 +00:00
Create jenkins_slave_docker
This commit is contained in:
parent
5211a217c0
commit
0e1a0fa7fd
23
docker/jenkins_slave_docker
Normal file
23
docker/jenkins_slave_docker
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
FROM jenkins/slave
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get -y install apt-transport-https \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
gnupg2 \
|
||||||
|
software-properties-common && \
|
||||||
|
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tm p/dkey; apt-key add /tmp/dkey && \
|
||||||
|
add-apt-repository \
|
||||||
|
"deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID" ) \
|
||||||
|
$(lsb_release -cs) \
|
||||||
|
stable" && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get -y install docker-ce
|
||||||
|
|
||||||
|
RUN apt-get install -y docker-ce
|
||||||
|
|
||||||
|
RUN usermod -a -G docker jenkins
|
||||||
|
|
||||||
|
USER jenkins
|
Loading…
Reference in New Issue
Block a user