Sign inSign up

octanewolf/jenkins-node-agent

By octanewolf

•Updated almost 2 years ago

Jenkins agent based on bookworm and node-lts

Image
Languages & frameworks
Integration & delivery
Developer tools
0

270

octanewolf/jenkins-node-agent repository overview

⁠Jenkins Inbound Agent with AdoptOpenJDK JRE and NODE.JS latest

This Docker image provides a Jenkins inbound agent pre-configured with the AdoptOpenJDK Java Runtime Environment (JRE). The image is based on the Debian Bookworm distribution and is designed to be multi-platform, supporting various architectures like linux/arm/v7 and others. The JRE is customized using jlink to reduce its footprint for non-ARM architectures.

⁠Key Features:
  • Debian Bookworm Base: The image is built upon the stable Debian Bookworm distribution for a secure and reliable environment.

  • AdoptOpenJDK JRE: A lightweight JRE (Java 17) is included in the image, optimized using jlink for non-ARM platforms to remove unnecessary components like man pages and debug symbols, reducing the overall size of the runtime.

  • Jenkins Inbound Agent: This image is tailored for Jenkins, serving as a pre-configured inbound agent. It includes the Jenkins remoting JAR, enabling seamless connectivity to your Jenkins master.

  • Multi-Platform Support: The Dockerfile uses the TARGETPLATFORM argument to ensure it builds correctly for different platforms, including ARM architectures.

  • Preinstalled Tools:

    • Node.js: Node.js LTS version is installed via the NodeSource repository, allowing you to execute Node.js tasks within the agent.
    • Git, Git LFS, OpenSSH: These are included for source control and remote operations, supporting common use cases for Jenkins agents.
    • Other utilities: Essential tools like curl, patch, and less are also pre-installed.

⁠Environment Variables:
  • JAVA_HOME: Points to the JDK runtime (/opt/java/openjdk) built and customized by jlink.
  • AGENT_WORKDIR: The working directory for Jenkins agent tasks, defaulting to /home/jenkins/agent.
  • USER: The Jenkins user is created and runs the container tasks.
  • TZ: Configured to UTC by default, but can be customized for different time zones.
  • PATH: Includes the Java and system binaries.

⁠Volumes:
  • /home/jenkins/.jenkins: Stores Jenkins-specific configurations and files.
  • /home/jenkins/agent: The agent's working directory where Jenkins jobs are executed.

⁠Usage:

To run this Jenkins inbound agent, pull the image and use the following command:

docker run -e JENKINS_URL=<your-jenkins-url> \
  -e JENKINS_SECRET=<your-secret> \
  -e JENKINS_AGENT_NAME=<agent-name> \
  <your-image-tag>

The agent can connect to a Jenkins master using the provided environment variables and jenkins-agent script.


⁠Entry Point:

The entry point for this image is the jenkins-agent script, which ensures the agent starts and connects to the Jenkins master correctly.


This Docker image simplifies setting up a Jenkins agent with an optimized AdoptOpenJDK runtime and necessary tools for various CI/CD pipelines.

Tag summary

Content type

Image

Digest

sha256:1d710cec7…

Size

765.4 MB

Last updated

almost 2 years ago

docker pull octanewolf/jenkins-node-agent