diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0e28ac3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +FROM jenkins/inbound-agent:latest + +USER root + +RUN apt-get update --yes && \ + apt-get upgrade --yes && \ + apt-get install --yes --no-install-recommends \ + bzip2 \ + libcurl4-openssl-dev \ + libssl-dev \ + build-essential \ + libxml2-dev \ + r-base \ + r-base-dev \ + libopenblas-base \ + texlive-base \ + texlive-xetex \ + texinfo \ + curl \ + texlive-fonts-recommended \ + pandoc \ + wget && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + +ADD Rprofile.site /usr/lib/R/etc + + + +USER jenkins + +RUN tlmgr init-usertree && \ + tlmgr option repository ftp://tug.org/historic/systems/texlive/2020/tlnet-final diff --git a/README.md b/README.md index 033a572..2653797 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,30 @@ # mybuildagent -My Docker Container for Jenkins Agents \ No newline at end of file +My Docker Container for Jenkins Agents + +This is the compose file I use. + +``` docker-compose +version: '3' + +services: + jenkins: + image: jenkins/jenkins:lts + restart: always + volumes: + - /dockerdata/jenkins:/var/jenkins_home + ports: + - 127.0.0.1:9999:port + - 127.0.0.1:53805:port + + jenkins-agent: + build: mybuildagent + volumes: + - /dockerdata/jenkins_agent:/home/jenkins/agent + restart: always + environment: + - JENKINS_URL=http://jenkins:firstport + - JENKINS_SECRET=secret + - JENKINS_AGENT_NAME=Agentname + - JENKINS_AGENT_WORKDIR=/home/jenkins/agent +``` diff --git a/Rprofile.site b/Rprofile.site new file mode 100644 index 0000000..abb7abb --- /dev/null +++ b/Rprofile.site @@ -0,0 +1,6 @@ +#set a CRAN mirror +local({r <- getOption("repos") + r["CRAN"] <- "https://cloud.r-project.org/" + options(repos=r) + options(Ncpus=8) +})