Set Environment Variables

Once you execute the docker run <XESProfileImageID> command, a new Docker container is created, inside which the new profile is started. By default, no environment variables are set, so you need to add them.

To set environment variables in Docker containers, use the '-e', '--env', and '--env-file' flags when running a Docker image. The '-e' and --env flags are used to define variables as name-value pairs and the --env-file flag defines the file which contains a list of variables.

The following command runs a test XEServer profile image with some environment variables predefined. Note that the --env-file flag takes the file name as an argument and expects each line of this file to be a name-value pair.

docker run \
-d \
--env-file zabbix.properties \
registry.corp.edifecs.com:5000/xes:8.6.0.SNAPSHOT \
https://etbuild01/job/Docker.Test.Profile/lastSuccessfulBuild/artifact/Test1/RestSampleProfile.zip