44 lines
1.4 KiB
Docker
44 lines
1.4 KiB
Docker
|
|
FROM arm64v8/openjdk:11-jre
|
||
|
|
MAINTAINER Marek Obuchowicz <marek@korekontrol.eu>
|
||
|
|
|
||
|
|
# Tini
|
||
|
|
ADD https://github.com/krallin/tini/releases/download/v0.18.0/tini-arm64 /tini
|
||
|
|
RUN chmod +x /tini
|
||
|
|
|
||
|
|
# Install docker client, kubectl and helm
|
||
|
|
RUN curl -sSL https://get.docker.com/ | sh
|
||
|
|
|
||
|
|
# Debian packages
|
||
|
|
RUN apt-get update -qy && \
|
||
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -qy python-pip groff-base git && \
|
||
|
|
apt-get clean && \
|
||
|
|
rm -rf /var/lib/apt/lists/*
|
||
|
|
|
||
|
|
# AWS CLI, j2cli
|
||
|
|
RUN pip install awscli && \
|
||
|
|
pip install j2cli
|
||
|
|
|
||
|
|
# Jenkins
|
||
|
|
ENV HOME /home/jenkins
|
||
|
|
RUN useradd -c "Jenkins user" -d $HOME -u 10000 -g 999 -m jenkins
|
||
|
|
LABEL Description="This is a base image, which provides the Jenkins agent executable (slave.jar) and tools: j2cli, awscli, docker client, kubectl and helm" Vendor="KoreKontrol" Version="3.27"
|
||
|
|
|
||
|
|
ARG VERSION=3.40
|
||
|
|
|
||
|
|
#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
|
||
|
|
|
||
|
|
ADD https://jenkins.docker.cabillot.eu/jnlpJars/agent.jar /usr/share/jenkins/agent.jar
|
||
|
|
RUN chmod 755 /usr/share/jenkins \
|
||
|
|
&& chmod 644 /usr/share/jenkins/agent.jar
|
||
|
|
|
||
|
|
# jnlp slave
|
||
|
|
COPY jenkins-slave /usr/local/bin/jenkins-slave
|
||
|
|
RUN chmod +x /usr/local/bin/jenkins-slave
|
||
|
|
|
||
|
|
USER jenkins
|
||
|
|
RUN mkdir /home/jenkins/.jenkins
|
||
|
|
VOLUME /home/jenkins/.jenkins
|
||
|
|
WORKDIR /home/jenkins
|
||
|
|
|
||
|
|
ENTRYPOINT ["/tini", "--", "jenkins-slave"]
|