Skip to main content
Version: Early Access

Dockerfile customization

This topic explains how to customize Dockerfile in Release.

You may need to customize your Dockerfile for various purposes, including but not limited to:

  • Connecting to a proprietary database (DB2, Oracle, etc.)
  • Adding a hotfix as instructed by our support team
  • Adding a custom plugin

Here's how you can customize a Docker image for your needs:

important

When creating a Dockerfile with custom resources, always ensure that the owning user:group combination is set to 10001:0.

note

Certain JAR files must be placed in specific directories. For example, you should not add an Oracle JAR to the ext/ folder. If you are unsure where a JAR file should be placed, please contact our support team for assistance.

note

By default, ${APP_HOME} points to the path /opt/xebialabs/xl-deploy-server

To begin, create a Dockerfile that resembles the following configuration:

FROM xebialabs/xl-release:25.1.0

###################################################################################
# PLUGINS #
# Plugins should be placed under ${APP_HOME}/default-plugins/ #
###################################################################################

COPY --chown=10001:0 files/xlr-delphix-plugin-9.0.0.jar /opt/xebialabs/xl-release-server/default-plugins/xlr-official/

# Add plugin from url
ADD --chown=10001:0 https://github.com/xebialabs-community/xlr-github-plugin/releases/download/v1.5.2/xlr-github-plugin-1.5.2.jar /opt/xebialabs/xl-release-server/default-plugins/__local__/

##########################################################################
# EXTENSIONS #
# Extensions should be placed under ${APP_HOME}/ext
##########################################################################
ADD --chown=10001:0 files/ext /opt/xebialabs/xl-release-server/ext/

##########################################################################
# HOTFIXES #
##########################################################################
ADD --chown=10001:0 files/hotfix.jar /opt/xebialabs/xl-release-server/hotfix/

##########################################################################
# LIBRARIES #
##########################################################################
ADD --chown=10001:0 files/ojdbc6.jar /opt/xebialabs/xl-release-server/lib/
note

All official Release plugins must be placed under default-plugins/xlr-official/ folder, while custom or community plugins must be placed under default-plugins/__local__/

For an overview of how ADD and COPY work, see the documentation.

Once you are satisfied with your Dockerfile, run the following command from the same directory:

docker build -t xl-release-custom:25.1.0`

This command builds and tags a docker image.

important

Always use semver to version your docker images.

To run this image locally, use the following command:

docker run -it --rm -p 5516:5516 -e "ADMIN_PASSWORD=desired_admin_password" -e ACCEPT_EULA=Y xl-release-custom:25.1.0`

If you want to host the Docker image elsewhere, you have two options:

Recommended:

  1. Push this image to a Docker registry of your choice. You can either set up your own registry, or use an offering from DockerHub, AWS, GCP and many others. The simplest way to do this is to run the following commands:
  • docker tag xl-release-custom:25.1.0 yourdockerhuborg/xl-release-custom:25.1.0
  • docker push yourdockerhuborg/xl-release-custom:25.1.0
  • (On the node you would like to run the container) docker run -it --rm -p 5516:5516 -e "ADMIN_PASSWORD=desired_admin_password" -e ACCEPT_EULA=Y yourdockerhuborg/xl-release-custom:25.1.0

Not recommended:

  1. By using docker export and docker load. This approach is not recommended, as it requires you to move a tar file between different machines.