imagegenius / docker-jenkins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GitHub Release GitHub Package Repository Jenkins Build IG CI

Jenkins is the leading open-source automation server. Built with Java, it provides over 1,800 plugins to support automating virtually anything, so that humans can spend their time doing things machines cannot.

jenkins

Supported Architectures

We use Docker manifest for cross-platform compatibility. More details can be found on Docker's website.

To obtain the appropriate image for your architecture, simply pull ghcr.io/imagegenius/jenkins:latest. Alternatively, you can also obtain specific architecture images by using tags.

This image supports the following architectures:

Architecture Available Tag
x86-64 amd64-<version tag>
arm64 arm64v8-<version tag>
armhf

Version Tags

This image offers different versions via tags. Be cautious when using unstable or development tags, and read their descriptions carefully.

Tag Available Description
latest Latest (weekly) Jenkins release with an Alpine base.

Application Setup

The WebUI can be found at http://your-ip:8080, the admin password for initial setup is printed in the logs, follow the setup steps to configure Jenkins.

This image has full support for PUID/PGID and docker-mods, so you could use the docker-in-docker mod from linuxserver to run docker within this container

Usage

Example snippets to start creating a container:

Docker Compose

---
services:
  jenkins:
    image: ghcr.io/imagegenius/jenkins:latest
    container_name: jenkins
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - "CLI_ARGS=-Xms1G -Xmx4G" #optional
    volumes:
      - path_to_appdata:/config
    ports:
      - 8080:8080
      - 50000:50000
    restart: unless-stopped
docker run -d \
  --name=jenkins \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e CLI_ARGS="-Xms1G -Xmx4G" `#optional` \
  -p 8080:8080 \
  -p 50000:50000 \
  -v path_to_appdata:/config \
  --restart unless-stopped \
  ghcr.io/imagegenius/jenkins:latest

Parameters

To configure the container, pass variables at runtime using the format <external>:<internal>. For instance, -p 8080:80 exposes port 80 inside the container, making it accessible outside the container via the host's IP on port 8080.

Parameter Function
-p 8080 WebUI Port
-p 50000 Slave Port
-e PUID=1000 UID for permissions - see below for explanation
-e PGID=1000 GID for permissions - see below for explanation
-e TZ=Etc/UTC Specify a timezone to use, see this list.
-e CLI_ARGS=-Xms1G -Xmx4G Optionally specify any CLI variables you want to launch java with. Misconfiguration will cause jenkins to fail to start!
-v /config Jenkins Home (appdata)

Umask for running applications

All of our images allow overriding the default umask setting for services started within the containers using the optional -e UMASK=022 option. Note that umask works differently than chmod and subtracts permissions based on its value, not adding. For more information, please refer to the Wikipedia article on umask here.

User / Group Identifiers

To avoid permissions issues when using volumes (-v flags) between the host OS and the container, you can specify the user (PUID) and group (PGID). Make sure that the volume directories on the host are owned by the same user you specify, and the issues will disappear.

Example: PUID=1000 and PGID=1000. To find your PUID and PGID, run id user.

  $ id username
    uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)

Updating the Container

Most of our images are static, versioned, and require an image update and container recreation to update the app. We do not recommend or support updating apps inside the container. Check the Application Setup section for recommendations for the specific image.

Instructions for updating containers:

Via Docker Compose

  • Update all images: docker-compose pull
    • or update a single image: docker-compose pull jenkins
  • Let compose update all containers as necessary: docker-compose up -d
    • or update a single container: docker-compose up -d jenkins
  • You can also remove the old dangling images: docker image prune

Via Docker Run

  • Update the image: docker pull ghcr.io/imagegenius/jenkins:latest
  • Stop the running container: docker stop jenkins
  • Delete the container: docker rm jenkins
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved)
  • You can also remove the old dangling images: docker image prune

Versions

  • 24.04.24: - rebase to alpine 3.19
  • 06.05.23: - Add CLI variables.
  • 27.03.23: - Initial release.

About

License:GNU General Public License v3.0


Languages

Language:Dockerfile 100.0%