build your own containerized version of udclient (deploy cli)
Download from your DevOps Deploy installation ("https://yourDeployServer:port/tools/udclient.zip") or Copy from installation media of your Deploy Server( <installmediaroot/opt/tomcat/webapps/ROOT/tools/>) your udclient.zip into this location, unzip it and run docker build
export DEPLOY_VERSION=8.2.0
wget https://<yourDeployServerurl:port>/tools/udclient.zip
unzip udclient
docker build . -t udclient:$DEPLOY_VERSIONhere an example with building for semeru-25 target
export DOCKER_BUILDKIT=1
DEPLOY_VERSION=8.2.0
JRETYPE=temurin-alpine
JREVERSION=25
wget https://<yourDeployServerurl:port>/tools/udclient.zip
unzip udclient
docker build -f Dockerfile.variations --build-arg 'PROVIDER='$JRETYPE --build-arg 'VERSION='$JREVERSION -t udclient:$DEPLOY_VERSION-$JRETYPE-$JREVERSION .
Usage is similar to the installed cli client. Just add the call to the docker container to it.
docker run udclient -weburl https://<yourDeployServerurl:port> -username <your username> -password <your password> getAgentsIf you run it without any parameters you will get a simple help info
docker run --rm udclient
Global Args:
-authtoken, --authtoken
Optional. Can be set via the environment variable DS_AUTH_TOKEN. An authentication token generated by the server. Either an authtoken or a username and password is required
-loggingConf, --loggingConf
Optional. Can be set via the environment variable loggingConf. A properties file for custom log4j 2 configuration. Overrides debug and debugHttp flags.
-password, --password
Optional. Can be set via the environment variable DS_PASSWORD. A password to authenticate with the server. Either an authtoken or a username and password is required
-proxyHost, --proxyHost
Optional. Can be set via the environment variable proxyHost. The hostname of a proxy (e.g., an agent relay) to use instead of directly connecting to the server
-proxyPassword, --proxyPassword
Optional. Can be set via the environment variable proxyPassword. A password to authenticate with the proxy.
-proxyPort, --proxyPort
Optional. Can be set via the environment variable proxyPort. The proxy port to use if a proxy hostname has been specified
-proxyUser, --proxyUser
Optional. Can be set via the environment variable proxyUser. A username to authenticate with the proxy.
-username, --username
Optional. Can be set via the environment variable DS_USERNAME. A username to authenticate with the server. Either an authtoken or a username and password is required
-verifyServerIdentity, --verifyServerIdentity
Optional. Can be set via the environment variable UC_TLS_VERIFY_CERTS. This option will only allow the command to complete if the server\'s certificate is trusted. (Default Value: false)
-weburl, --weburl
Required. Can be set via the environment variable DS_WEB_URL. The base URL of the DevOps Deploy server. Eg. http://ucd.domain.com:8080
Global Flags:
-t, --getTemplate
Show the JSON template for the command instead of running the command. If a file argument is provided, the template will be output to that file.
-h, --help
Print the full description and help of the given command instead of running the command.
-v, --verbose
Print extra information during execution.
--debug
Print debugging information during execution. Implies verbose.
--debugHttp
Print detailed HTTP debugging information during execution.
Commands:
Provide a web URL, username, and password to show all available commands.
- https://stackoverflow.com/questions/62183656/re-use-dockerfile-with-different-base-image
- https://stackoverflow.com/questions/17466699/how-do-i-build-a-dockerfile-if-the-name-of-the-dockerfile-isnt-dockerfile
- https://docs.docker.com/build/building/packaging/
- https://www.ibm.com/docs/en/urbancode-deploy/7.3.1 and https://www.ibm.com/docs/en/urbancode-deploy/7.3.1?topic=function-command-line-client-cli-reference
- https://www.ibm.com/docs/en/devops-deploy/8.2.0 and https://www.ibm.com/docs/en/devops-deploy/8.2.0?topic=function-command-line-client-cli-reference
based on information from the image for Eclipse-Temurin-25 the JRE is available in ENV JAVA_HOME=/opt/java/openjdk
based on information from the image for Semeru runtimes the JRE is available in ENV JAVA_HOME=/opt/java/openjdk
- removed udcli by fixing JAVA_HOME setting
- added input parameters for build_example.sh to support more flexible selection of JRE types and versions