# Bitnami Secure Image for Jenkins

> Jenkins is an open source Continuous Integration and Continuous Delivery (CI/CD) server designed to automate the building, testing, and deploying of any software project.

[Overview of Jenkins](https://jenkins.io/)
Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.

## TL;DR

```console
docker run --name jenkins bitnami/jenkins:latest
```

You can find the default credentials and available configuration options in the [Environment Variables](#environment-variables) section.

## Why use Bitnami Secure Images?

Those are hardened, minimal CVE images built and maintained by Bitnami. Bitnami Secure Images are based on the cloud-optimized, security-hardened enterprise [OS Photon Linux](https://vmware.github.io/photon/). Why choose BSI images?

- Hardened secure images of popular open source software with Near-Zero Vulnerabilities
- Vulnerability Triage & Prioritization with VEX Statements, KEV and EPSS Scores
- Compliance focus with FIPS, STIG, and air-gap options, including secure bill of materials (SBOM)
- Software supply chain provenance attestation through in-toto
- First class support for the internet’s favorite Helm charts

Each image comes with valuable security metadata. You can view the metadata in [our public catalog here](https://app-catalog.vmware.com/bitnami/apps). Note: Some data is only available with [commercial subscriptions to BSI](https://bitnami.com/).

![Alt text](https://github.com/bitnami/containers/blob/main/BSI%20UI%201.png?raw=true "Application details")
![Alt text](https://github.com/bitnami/containers/blob/main/BSI%20UI%202.png?raw=true "Packaging report")

If you are looking for our previous generation of images based on Debian Linux, please see the [Bitnami Legacy registry](https://hub.docker.com/u/bitnamilegacy).

## How to deploy Jenkins in Kubernetes?

Deploying Bitnami applications as Helm Charts is the easiest way to get started with our applications on Kubernetes. Read more about the installation in the [Bitnami Jenkins Chart GitHub repository](https://github.com/bitnami/charts/tree/master/bitnami/jenkins).

## Why use a non-root container?

Non-root container images add an extra layer of security and are generally recommended for production environments. However, because they run as a non-root user, privileged tasks are typically off-limits. Learn more about non-root containers [in our docs](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-work-with-non-root-containers-index.html).

## Supported tags and respective `Dockerfile` links

Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-understand-rolling-tags-containers-index.html).

## Get this image

The recommended way to get the Bitnami Jenkins Docker Image is to pull the prebuilt image from the [Docker Hub Registry](https://hub.docker.com/r/bitnami/jenkins).

```console
docker pull bitnami/jenkins:latest
```

To use a specific version, you can pull a versioned tag. You can view the [list of available versions](https://hub.docker.com/r/bitnami/jenkins/tags/) in the Docker Hub Registry.

```console
docker pull bitnami/jenkins:[TAG]
```

If you wish, you can also build the image yourself by cloning the repository, changing to the directory containing the Dockerfile and executing the `docker build` command. Remember to replace the `APP`, `VERSION` and `OPERATING-SYSTEM` path placeholders in the example command below with the correct values.

```console
git clone https://github.com/bitnami/containers.git
cd bitnami/APP/VERSION/OPERATING-SYSTEM
docker build -t bitnami/APP:latest .
```

## How to use this image

### Using Docker Compose

Please be aware this file has not undergone internal testing. Consequently, we advise its use exclusively for development or testing purposes. For production-ready deployments, we highly recommend utilizing its associated [Bitnami Helm chart](https://github.com/bitnami/charts/tree/main/bitnami/jenkins).

## Persisting your application

If you remove the container all your data and configurations will be lost, and the next time you run the image the database will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed.

For persistence you should mount a volume at the `/bitnami/jenkins` path. The above examples define a docker volume namely `jenkins_data`. The Jenkins application state will persist as long as this volume is not removed.

To avoid inadvertent removal of this volume you can [mount host directories as data volumes](https://docs.docker.com/engine/tutorials/dockervolumes/). Alternatively you can make use of volume plugins to host the volume data.

## Configuration

The following section describes the supported environment variables

### Environment variables

The following tables list the main variables you can set.

#### Customizable environment variables

| Name                                 | Description                                                                                                                           | Default Value                |
|--------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|------------------------------|
| `JENKINS_HOME`                       | Jenkins home directory.                                                                                                               | `${JENKINS_VOLUME_DIR}/home` |
| `JENKINS_PLUGINS`                    | Comma-separated list of Jenkins plugins to be installed.                                                                              | `nil`                        |
| `JENKINS_PLUGINS_LATEST`             | Set to false to install the minimum required version.                                                                                 | `true`                       |
| `JENKINS_PLUGINS_LATEST_SPECIFIED`   | Set to true to install the latest dependencies of any plugin that is requested to have the latest version.                            | `false`                      |
| `JENKINS_SKIP_IMAGE_PLUGINS`         | Set to true to skip the installation of image built-in plugins.                                                                       | `false`                      |
| `JENKINS_OVERRIDE_PLUGINS`           | Set to true to force overriding existing plugins from the persisted volume.                                                           | `false`                      |
| `JENKINS_OVERRIDE_PATHS`             | Comma-separated list of relative paths to be removed from the Jenkins home and recreated if present in the mounted content directory. | `nil`                        |
| `JENKINS_HTTP_LISTEN_ADDRESS`        | Jenkins HTTP listen address.                                                                                                          | `nil`                        |
| `JENKINS_HTTPS_LISTEN_ADDRESS`       | Jenkins HTTPS listen address.                                                                                                         | `nil`                        |
| `JENKINS_HTTP_PORT_NUMBER`           | Jenkins HTTP port number.                                                                                                             | `nil`                        |
| `JENKINS_HTTPS_PORT_NUMBER`          | Jenkins HTTPS port number.                                                                                                            | `nil`                        |
| `JENKINS_JNLP_PORT_NUMBER`           | Jenkins JNLP port number.                                                                                                             | `nil`                        |
| `JENKINS_EXTERNAL_HTTP_PORT_NUMBER`  | Port to access Jenkins from outside of the instance using HTTP.                                                                       | `80`                         |
| `JENKINS_EXTERNAL_HTTPS_PORT_NUMBER` | Port to access Jenkins from outside of the instance using HTTPS.                                                                      | `443`                        |
| `JENKINS_HOST`                       | Jenkins hostname.                                                                                                                     | `nil`                        |
| `JENKINS_FORCE_HTTPS`                | Enable serving Jenkins through HTTPS instead of HTTP.                                                                                 | `no`                         |
| `JENKINS_SKIP_BOOTSTRAP`             | Whether to perform initial bootstrapping for the application.                                                                         | `no`                         |
| `JENKINS_ENABLE_SWARM`               | Enable the Jenkins Swarm configuration.                                                                                               | `no`                         |
| `JENKINS_CERTS_DIR`                  | Password of keystore.                                                                                                                 | `${JENKINS_HOME}`            |
| `JENKINS_KEYSTORE_PASSWORD`          | Password of keystore.                                                                                                                 | `bitnami`                    |
| `JENKINS_OPTS`                       | Jenkins launcher parameters.                                                                                                          | `nil`                        |
| `JENKINS_USERNAME`                   | Jenkins admin user name.                                                                                                              | `user`                       |
| `JENKINS_PASSWORD`                   | Jenkins admin user password.                                                                                                          | `bitnami`                    |
| `JENKINS_EMAIL`                      | Jenkins admin user e-mail address.                                                                                                    | `user@example.com`           |
| `JENKINS_SWARM_USERNAME`             | Jenkins user for Swarm access name .                                                                                                  | `swarm`                      |
| `JENKINS_SWARM_PASSWORD`             | Jenkins user for Swarm access password.                                                                                               | `nil`                        |
| `JAVA_HOME`                          | Java Home directory.                                                                                                                  | `${BITNAMI_ROOT_DIR}/java`   |
| `JAVA_OPTS`                          | Java options.                                                                                                                         | `nil`                        |

#### Read-only environment variables

| Name                                   | Description                                                                                | Value                                                   |
|----------------------------------------|--------------------------------------------------------------------------------------------|---------------------------------------------------------|
| `JENKINS_BASE_DIR`                     | Jenkins installation directory.                                                            | `${BITNAMI_ROOT_DIR}/jenkins`                           |
| `JENKINS_LOGS_DIR`                     | Jenkins directory for log files.                                                           | `${JENKINS_BASE_DIR}/logs`                              |
| `JENKINS_LOG_FILE`                     | Path to the Jenkins log file.                                                              | `${JENKINS_LOGS_DIR}/jenkins.log`                       |
| `JENKINS_TMP_DIR`                      | Jenkins directory for runtime temporary files.                                             | `${JENKINS_BASE_DIR}/tmp`                               |
| `JENKINS_PID_FILE`                     | Path to the Jenkins PID file.                                                              | `${JENKINS_TMP_DIR}/jenkins.pid`                        |
| `JENKINS_TEMPLATES_DIR`                | Path to the directory containing templates to generate groovy scripts.                     | `${BITNAMI_ROOT_DIR}/scripts/jenkins/bitnami-templates` |
| `JENKINS_VOLUME_DIR`                   | Persistence base directory.                                                                | `${BITNAMI_VOLUME_DIR}/jenkins`                         |
| `JENKINS_MOUNTED_CONTENT_DIR`          | Directory to mount custom Jenkins content (such as Groovy scripts or configuration files). | `/usr/share/jenkins/ref`                                |
| `JENKINS_DAEMON_USER`                  | Jenkins system user.                                                                       | `jenkins`                                               |
| `JENKINS_DAEMON_GROUP`                 | Jenkins system group.                                                                      | `jenkins`                                               |
| `JENKINS_DEFAULT_HTTP_LISTEN_ADDRESS`  | Default Jenkins HTTP listen address to enable at build time.                               | `0.0.0.0`                                               |
| `JENKINS_DEFAULT_HTTPS_LISTEN_ADDRESS` | Default Jenkins HTTPS listen address to enable at build time.                              | `0.0.0.0`                                               |
| `JENKINS_DEFAULT_HTTP_PORT_NUMBER`     | Default Jenkins HTTP port number to enable at build time.                                  | `8080`                                                  |
| `JENKINS_DEFAULT_HTTPS_PORT_NUMBER`    | Default Jenkins HTTPS port number to enable at build time.                                 | `8443`                                                  |
| `JENKINS_DEFAULT_JNLP_PORT_NUMBER`     | Default Jenkins JNLP port number to enable at build time.                                  | `50000`                                                 |

When you start the Jenkins image, you can adjust the configuration of the instance by passing one or more environment variables either on the docker-compose file or on the `docker run` command line.

### FIPS configuration in Bitnami Secure Images

The Bitnami Jenkins Docker image from the [Bitnami Secure Images](https://go-vmware.broadcom.com/contact-us) catalog includes extra features and settings to configure the container with FIPS capabilities. You can configure the next environment variables:

- `OPENSSL_FIPS`: whether OpenSSL runs in FIPS mode or not. `yes` (default), `no`.
- `JAVA_TOOL_OPTIONS`: controls Java FIPS mode. Use `-Djava.security.properties==/opt/bitnami/java/conf/security/java.security.restricted` (restricted), `-Djava.security.properties==/opt/bitnami/java/conf/security/java.security.relaxed` (relaxed), or `-Djava.security.properties==/opt/bitnami/java/conf/security/java.security.original` (off).

## Logging

The Bitnami Jenkins Docker image sends the container logs to `stdout`. To view the logs:

```console
docker logs jenkins
```

Or using Docker Compose:

```console
docker-compose logs jenkins
```

You can configure the containers [logging driver](https://docs.docker.com/engine/admin/logging/overview/) using the `--log-driver` option if you wish to consume the container logs differently. In the default configuration docker uses the `json-file` driver.

## Maintenance

### Backing up your container

To backup your data, configuration and logs, follow these simple steps:

#### Step 1: Stop the currently running container

- For docker-compose: `$ docker-compose stop jenkins`
- For manual execution: `$ docker stop jenkins`

#### Step 2: Run the backup command

We need to mount two volumes in a container we will use to create the backup: a directory on your host to store the backup in, and the volumes from the container we just stopped so we can access the data.

```console
docker run --rm -v /path/to/jenkins-backups:/backups --volumes-from jenkins bitnami/os-shell \
  cp -a /bitnami/jenkins /backups/latest
```

### Restoring a backup

Restoring a backup is as simple as mounting the backup as volumes in the containers.

```diff
 $ docker run -d --name jenkins \
   ...
-  --volume /path/to/jenkins-persistence:/bitnami/jenkins \
+  --volume /path/to/jenkins-backups/latest:/bitnami/jenkins \
   bitnami/jenkins:latest
```

## Customize this image

For customizations, please note that this image is, by default, a non-root container using the user `jenkins` with `uid=1001`.

### Extend this image

To extend the bitnami original image, you can create your own image using a Dockerfile with the format below:

```Dockerfile
FROM bitnami/jenkins
## Put your customizations below
...
```

Here is an example of extending the image with the following modifications:

- Install the `vim` editor

```Dockerfile
FROM bitnami/jenkins

## Change user to perform privileged actions
USER 0
## Install 'vim'
RUN install_packages vim
## Revert to the original non-root user
USER 1001
```

### Installing plugins

To download and install a set of plugins and their dependencies, use the [Plugin Installation Manager tool](https://github.com/jenkinsci/plugin-installation-manager-tool). You can find information about how to use this tool in the guide below:

- [Getting Started with Plugin Installation Manager tool](https://github.com/jenkinsci/plugin-installation-manager-tool#getting-started)

Alternatively, it is possible to install plugins using the following env variables:

- `JENKINS_PLUGINS`: Comma-separated list of Jenkins plugins to be installed during the first boot.
- `JENKINS_PLUGINS_LATEST`: If set to false, install the minimum required version of the plugins in `JENKINS_PLUGINS`. Default: **true**
- `JENKINS_PLUGINS_LATEST_SPECIFIED`: If set to true, install the latest dependencies of any plugin that is requested to have the latest version. Default: **false**
- `JENKINS_OVERRIDE_PLUGINS`: If set to true, existing plugins in the persisted volume will be removed and will force plugins to be reinstalled. Default: **false**
- `JENKINS_SKIP_IMAGE_PLUGINS`: If set to true, skip the installation of image built-in plugins. Default: **false**

### Passing JVM parameters

You might need to customize the JVM running Jenkins, typically to pass system properties or to tweak heap memory settings. Use the `JAVA_OPTS` environment variable for this purpose:

```console
docker run -d --name jenkins -p 80:8080 \
  --env JAVA_OPTS=-Dhudson.footerURL=http://mycompany.com \
  bitnami/jenkins:latest
```

### Using custom launcher parameters

In order to use custom parameters for Jenkins launcher, for example if you need to install Jenkins behind a reverse proxy with a prefix such as mycompany.com/jenkins, you can use the "JENKINS_OPTS" environment variable:

```console
docker run -d --name jenkins -p 8080:8080 \
  --env JENKINS_OPTS="--prefix=/jenkins" \
  bitnami/jenkins:latest
```

### Skipping Bitnami initialization

By default, when running this image, Bitnami implement some logic in order to configure it for working out of the box. This initialization consists of creating the user and password, preparing data to persist, configuring permissions, creating the `JENKINS_HOME`, etc. You can skip it in two ways:

- Setting the `JENKINS_SKIP_BOOTSTRAP` environment variable to `yes`.
- Attaching a volume with a custom `JENKINS_HOME` that contains a functional Jenkins installation.

### Adding files/directories to the image

You can include files to the image automatically. All files/directories located in `/usr/share/jenkins/ref` are copied to `/bitnami/jenkins/home` (default Jenkins home directory).

#### Examples

##### Run groovy scripts at Jenkins start up

You can create custom groovy scripts and make Jenkins run them at start up.

However, using this feature will disable the default configuration done by the Bitnami scripts. This is intended to customize the Jenkins configuration by code.

```console
$ mkdir jenkins-init.groovy.d
$ echo "println '--> hello world'" > jenkins-init.groovy.d/AA_hello.groovy
$ echo "println '--> bye world'" > jenkins-init.groovy.d/BA_bye.groovy

docker run -d -p 80:8080 --name jenkins \
  --env "JENKINS_SKIP_BOOTSTRAP=yes" \
  --volume "$(pwd)/jenkins-init.groovy.d:/usr/share/jenkins/ref/init.groovy.d" \
  bitnami/jenkins:latest

$ docker logs jenkins | grep world
--> hello world!
--> bye world!
```

##### Run custom `config.xml`

You can use your our own `config.xml` file. However, using this feature will disable the default configuration generated by the Bitnami scripts. This is intended to customize the Jenkins configuration by code.

```console
docker run -d -p 80:8080 --name jenkins \
  --env "JENKINS_SKIP_BOOTSTRAP=yes" \
  --volume "$(pwd)/config.xml:/usr/share/jenkins/ref/config.xml" \
  bitnami/jenkins:latest
```

> **NOTE** The default `admin` user with this setup will not be created. It should be done separately.

## Notable Changes

### 2.346.3-debian-11-r3

- The preinstalled plugins were removed.

### 2.332.2-debian-10-r21

- HTTPS and HTTP support are enabled by default.
- `JENKINS_ENABLE_HTTPS` has been renamed to `JENKINS_FORCE_HTTPS`.

### 2.277.4-debian-10-r19

- The size of the container image has been decreased.
- The configuration logic is now based on Bash scripts in the *rootfs/* folder.
- Only the Jenkins Home directory is persisted.
- The `install-plugins.sh` script has been deprecated. Instead use the Plugin Installation Manager Tool as explained in the [Installing Plugins](#installing-plugins) section.
- The `DISABLE_JENKINS_INITIALIZATION` environment variable was renamed to `JENKINS_SKIP_BOOTSTRAP`.

### 2.263.3-debian-10-rXX

- The deprecated plugins below are not included in the image by default anymore:
  - [GitHub Organization Folder](https://plugins.jenkins.io/github-organization-folder).
  - [Pipeline: Declarative Agent API](https://plugins.jenkins.io/pipeline-model-declarative-agent).

### 2.222.1-debian-10-r17

- Java distribution has been migrated from AdoptOpenJDK to OpenJDK Liberica. As part of VMware, we have an agreement with Bell Software to distribute the Liberica distribution of OpenJDK. That way, we can provide support & the latest versions and security releases for Java.

### 2.204.4-debian-10-r3

- The Jenkins container has been migrated to a "non-root" user approach. Previously the container ran as the `root` user and the Jenkins service was started as the `jenkins` user. From now on, both the container and the Jenkins service run as user `jenkins` (`uid=1001`). You can revert this behavior by changing `USER 1001` to `USER root` in the Dockerfile.
- Consequences:
  - Backwards compatibility is not guaranteed when data is persisted using docker or docker-compose. We highly recommend migrating your Jenkins data ensuring the `jenkins` user has the appropriate permissions.
  - No "privileged" actions are allowed anymore.

### 2.121.2-ol-7-r14 / 2.121.2-debian-9-r18

- Use Jetty instead of Tomcat as web server.

### 2.107.1-r0

- The Jenkins container has been migrated to the LTS version. From now on, this repository will only track long term support releases from [Jenkins](https://jenkins.io/changelog-stable/).

## License

Copyright &copy; 2026 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

<http://www.apache.org/licenses/LICENSE-2.0>

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
