Dockerfile customization
This topic explains how to customize a Dockerfile for Digital.ai Deploy, including adding proprietary databases, hotfixes, and custom plugins.
You can customize a Docker image for your needs as described in the process below.
When you create a Dockerfile with custom resources added, always remember that the owning user:group combination must be 10001:0
, or else, Deploy will not be able to read the files.
Certain JARS should be placed in specific paths only. For example, you shouldn't add a Oracle JAR to the ext/
folder. If you are unsure where a JAR should be added, please get in touch with our support team.
${APP_HOME}
points to the path /opt/xebialabs/xl-deploy-server
by default
To begin, create a Dockerfile
that resembles the following configuration:
FROM xebialabs/xl-deploy:10.2.0
###################################################################################
# PLUGINS #
# Plugins should be placed under ${APP_HOME}/default-plugins/ #
###################################################################################
COPY --chown=10001:0 files/xld-liquibase-plugin-5.0.1.xldp /opt/xebialabs/xl-deploy-server/default-plugins/
# Add plugin from url
ADD --chown=10001:0 https://dist.xebialabs.com/public/community/deploy/command2-plugin/3.9.1-1/command2-plugin-3.9.1-1.jar /opt/xebialabs/xl-deploy-server/default-plugins/
##########################################################################
# EXTENSIONS #
# Extensions should be placed under ${APP_HOME}/ext
##########################################################################
ADD --chown=10001:0 files/ext /opt/xebialabs/xl-deploy-server/ext/
##########################################################################
# HOTFIXES #
##########################################################################
ADD --chown=10001:0 files/lib-hotfix.jar /opt/xebialabs/xl-deploy-server/hotfix/lib/
ADD --chown=10001:0 files/plugin-hotfix.jar /opt/xebialabs/xl-deploy-server/hotfix/plugin/
ADD --chown=10001:0 files/sattelite-lib-hotfix.jar /opt/xebialabs/xl-deploy-server/hotfix/sattelite-lib/
##########################################################################
# LIBRARIES #
##########################################################################
ADD --chown=10001:0 files/ojdbc6.jar /opt/xebialabs/xl-deploy-server/lib/
There are separate hotfix directories for placing different types of hotfix JARS. If you are unsure where a hotfix JAR should be placed, please get in touch with our support team.
For an overview of how ADD
and COPY
works, see the documentation.
Once you are satisfied with your Dockerfile, run the following command in the same directory:
docker build -t xl-deploy-custom:10.2.0 .
This command will build and tag a Docker image for you.
Always use semver to version your docker images.
To run the image locally, use the following command:
docker run -it --rm -p 4516:4516 -e "ADMIN_PASSWORD=desired_admin_password" -e ACCEPT_EULA=Y xl-deploy-custom:10.2.0
If you would like to host the docker image elsewhere, you have two options:
Recommended:
- 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 of achieving this is to simply run
docker tag xl-deploy-custom:10.2.0 yourdockerhuborg/xl-deploy-custom:10.2.0
docker push yourdockerhuborg/xl-deploy-custom:10.2.0
docker run -it --rm -p 4516:4516 -e "ADMIN_PASSWORD=desired_admin_password" -e ACCEPT_EULA=Y yourdockerhuborg/xl-deploy-custom:10.2.0
on the node you would like to run the container.
Not recommended:
2. By using docker export
and docker load
. This is approach is not recommended, as it requires you to move a tar file between different machines.