Sign inSign up

thorpejosh/ssh-agent-docker

By thorpejosh

•Updated over 1 year ago

Jenkins SSH agent image with the docker-cli binary baked in

Image
1

9.4K

thorpejosh/ssh-agent-docker repository overview

⁠Jenkins SSH agent image with docker-cli binary added

GitHub License GitHub release Docker Pulls Docker Pulls Docker Pulls Image Size

Simply the official Jenkins SSH agent⁠ with the docker cli binary from the official docker image⁠ baked into it.

⁠Why?

This allows the Jenkins SSH agent (running in a container) to execute docker commands, enabling docker pipelines⁠ to be executed on the agent.

⁠Image variants

⁠Shared tags
  • latest, ${IMAGE_VERSION}

This image will follow the jenkins/ssh-agent⁠ ${IMAGE_VERSION} tag. ${IMAGE_VERSION} is a semver⁠ tagging that follows the same train as latest and is currently based on debian-bookworm and jdk11.

When semver releases are published they will also be tagged latest which is one-to-one with jenkins/ssh-agent:latest

ThorpeJosh image with docker binaryJenkins image it is based on
thorpejosh/ssh-agent-docker:latestjenkins/ssh-agent:latest
thorpejosh/ssh-agent-docker:5.16.0jenkins/ssh-agent:5.16.0
⁠Registries

The image is published on both docker.io⁠ and ghcr.io⁠

⁠Architectures

Both amd64 and arm64 images are available in each release manifest.

⁠How to use this image

⁠Recommendations
  • Run this image on a rootless docker/podman install since the agent needs POST access to the docker socket.
  • Use a docker socket proxy instead of bind mounting the socket into the agent container.

See jenkins/ssh-agent⁠ for more details on how to use container.

Example compose file showing the rootless docker socket mounted:

---

volumes:
  jenkins_agent_home:
    external: true

services:
  jenkins-ssh-agent:
    image: thorpejosh/ssh-agent-docker:latest  # Recommend using semver tag instead of `latest`
    container_name: jenkins-ssh-agent
    environment:
      - JENKINS_AGENT_SSH_PUBKEY=<ssh public key>
    volumes:
      - jenkins_agent_home:/home/jenkins
      # Mount rootless docker socket, but recommend using a docker socket proxy instead
      - /run/user/1000/docker.sock:/var/run/docker.sock
    ports:
      - 2222:22
    cgroup: host
    restart: unless-stopped

Tag summary

Content type

Image

Digest

sha256:bac8fdd94…

Size

193.4 MB

Last updated

over 1 year ago

docker pull thorpejosh/ssh-agent-docker