blob: 139d4e15ac05b818b12fcc49175c89d985248843 [file] [log] [blame]
Alanny Lopezedbad282017-04-24 12:41:27 -05001# Dockerfile for x86_64 Jenkins JNLP Slave Agent Container with Kubectl and Docker Installed
2
3FROM jenkinsci/jnlp-slave
4
5MAINTAINER Alanny Lopez (alanny.lopez@ibm.com)
6
7USER root
8
9# Download and install Kubectl
10RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s \
11 https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl \
12 && chmod +x ./kubectl \
13 && mv ./kubectl /usr/local/bin/kubectl
14
15# install Docker and grant access to Jenkins user
16RUN curl -sSL https://get.docker.com/ | sh
17RUN usermod -a -G docker jenkins
18
19USER jenkins
20
21ENTRYPOINT ["jenkins-slave"]