GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Think-Cube/docker-jenkins-agent-node: Lightweight Docker image for a Jenkins build agent with Node.js support. Ideal for CI/CD pipelines using Jenkins

BranchesTags
Open more actions menu

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
pipelines
pipelines
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
setup-sshd
setup-sshd
 
 

Repository files navigation

Docker Jenkins Agent Node

A lightweight and extensible Docker image for running a Jenkins build agent over SSH. It creates a dedicated non-root user, sets up a secure SSH server, and is ready to be used as an SSH agent in Jenkins pipelines.

Features

  • Creates dedicated jenkins user (with customizable UID/GID)
  • Installs and configures openssh-server
  • Allows injection of SSH public keys via environment variables or container arguments
  • Automatically generates SSH host keys if missing
  • Secure by default: disables root login and password authentication
  • Easily extensible with tools like Node.js, npm, or Yarn

Getting Started

Build the Image

docker build -t jenkins-agent-node .

Run the Container

Using environment variable:

docker run -d \
  -e JENKINS_AGENT_SSH_PUBKEY="ssh-rsa AAAA..." \
  -p 2222:22 \
  jenkins-agent-node

Or pass the SSH public key as a parameter:

docker run -d \
  -p 2222:22 \
  jenkins-agent-node "ssh-rsa AAAA..."

Connect from Jenkins

In Jenkins:

  • Host: IP or hostname of your Docker host
  • Port: 2222 (or the mapped SSH port)
  • Credentials: Use a matching SSH private key
  • Remote root directory: /home/jenkins

Environment Variables

Variable Description
JENKINS_AGENT_SSH_PUBKEY SSH public key to authorize in the container
JENKINS_AGENT_HOME Home directory for the Jenkins user
user, group Username and group name (default: jenkins)
uid, gid UID and GID of the user (default: 1000)

License

This project is open source and available under the MIT License.

About

Lightweight Docker image for a Jenkins build agent with Node.js support. Ideal for CI/CD pipelines using Jenkins

Topics

dockerjenkinstooling

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.