Create custom Docker images

2 minute readReference

CloudBees CD/RO component binaries and associated Dockerfiles are available for download to create custom Docker images.

Downloads are available on the CloudBees CD/RO server download area on the CloudBees Software Delivery Automation download page.

CloudBees CD/RO component

Dockerfile

Component binaries

server

Dockerfile.server

server.tar.gz

agent

Dockerfile.agent

agent.tar.gz

web

Dockerfile.web

web.tar.gz

analytics

Dockerfile.analytics

analytics.tar.gz

repository

Dockerfile.repository

repository.tar.gz

tools

Dockerfile.tools

tools.tar.gz

You must have Docker Desktop installed on your system before performing the steps below.

  1. For the selected component, download its Dockerfile and TAR archive into a local folder on your system.

  2. Run the commands below to validate the integrity of the files.

    ~/cbcd $ ls -larth total 543344 -rw-r--r--@ 1 user staff 2.4K Aug 22 17:08 Dockerfile.agent -rw-r--r--@ 1 user staff 265M Aug 22 17:24 agent.tar.gz -rw-r--r--@ 1 user staff 51B Aug 22 17:24 Dockerfile.agent.md5 -rw-r--r--@ 1 user staff 47B Aug 22 17:24 agent.tar.gz.md5 drwxr-xr-x 6 user staff 192B Aug 22 17:28 . drwxr-xr-x+ 143 user staff 4.5K Aug 22 17:28 ..
    ~/cbcd $ cat *.md5
    88274c5ddf4233a5ae7ce37cf3c7cc3c  Dockerfile.agent
    57e6e8e18a53da0b7db0b24361d3ee74  agent.tar.gz
    ~/cbcd $ md5 *.(gz|agent)
    MD5 (Dockerfile.agent) = 88274c5ddf4233a5ae7ce37cf3c7cc3c
    MD5 (agent.tar.gz) = 57e6e8e18a53da0b7db0b24361d3ee74
    ~/cbcd $
  3. Run the following command.

    ~/cbcd $ ls -larth total 543344 -rw-r--r--@ 1 user staff 2.4K Aug 22 17:08 Dockerfile.agent -rw-r--r--@ 1 user staff 265M Aug 22 17:24 agent.tar.gz -rw-r--r--@ 1 user staff 51B Aug 22 17:24 Dockerfile.agent.md5 -rw-r--r--@ 1 user staff 47B Aug 22 17:24 agent.tar.gz.md5 drwxr-xr-x 6 user staff 192B Aug 22 17:28 . drwxr-xr-x+ 143 user staff 4.5K Aug 22 17:28 ..
  4. Change the lines with FROM on the Dockerfiles by running the command below, which uses your preferred based image file instead of the one on the original Dockerfile.

    ~/cbcd $ grep FROM Dockerfile.agent # FROM registry.access.redhat.com/ubi8/ubi:8.6-754.1655117782 FROM registry.access.redhat.com/ubi8/ubi:8.6-903 # FROM registry.access.redhat.com/ubi8/ubi:8.6-754.1655117782 FROM registry.access.redhat.com/ubi8/ubi:8.6-903
  5. From the command line, run the following Docker command:

    docker build -t <image-name> -f Dockerfile.<component-name> <path-to-tar-archive-folder>

    For example, to create a Docker image for the CloudBees CD/RO agent, run:

    docker build -t agent-image -f Dockerfile.agent <path-to-tar-archive>