Public Repository

Last pushed: 24 days ago
Short Description
Short description is empty for this repo.
Full Description

wget https://raw.githubusercontent.com/jenkinsci/docker-jnlp-slave/master/jenkins-slave

Dockerfile

FROM openjdk:8-jdk
ENV HOME /home/jenkins
RUN groupadd -g 1000 jenkins
RUN useradd -c "Jenkins user" -d $HOME -u 1000 -g 1000 -m jenkins

LABEL Description="This is a base image, which provides the Jenkins agent executable (slave.jar)" Vendor="Jenkins project" Version="3.7"

ARG VERSION=3.9

RUN curl --create-dirs -sSLo /usr/share/jenkins/slave.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar \
&& chmod 755 /usr/share/jenkins \
&& chmod 644 /usr/share/jenkins/slave.jar

USER jenkins
RUN mkdir /home/jenkins/.jenkins
VOLUME /home/jenkins/.jenkins
WORKDIR /home/jenkins

USER root
RUN apt-get update
RUN apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common

RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
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 docker-ce -y

RUN apt-get install postgresql-client -y
RUN apt-get install sudo -y
RUN echo "jenkins ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
RUN chmod +x ./kubectl
RUN mv ./kubectl /usr/bin/kubectl

RUN apt-get clean

USER jenkins
COPY jenkins-slave /usr/local/bin/jenkins-slave
ENTRYPOINT ["jenkins-slave"]

Docker Pull Command
Owner
grommir

Comments (0)