Installation and Upgrade Guide > TDV Docker Container > Launching TDV Containers > Launching TDV Containers (Single Node) - Using Docker Run
 
Launching TDV Containers (Single Node) - Using Docker Run
This section will explain how to start a TDV Docker container (Single Node). If you need to review TDV container sizing guidelines refer Sizing Guidelines for TDV
General examples for launching a single node TDV Docker container
Below is a generic example for launching a single node docker container. Note that you must execute the “docker run” command for all 3 TDV containers (repo, cache and server).
 
ocker volume create --name tdv0.0clustercache-vol 2>&1 > /dev/null
docker volume create --name tdv0.0clusterrepo-vol 2>&1 > /dev/null
docker volume create --name tdv0.0cluster-vol 2>&1 > /dev/null
 
docker run -itd --cpus 1.0 --restart unless-stopped --memory 2g --network tdv-bridge -p 9404:9404 -v tdv0.0clustercache-vol:/var/lib/postgresql/data --env POSTGRES_USER=<user> --env POSTGRES_PASSWORD=<tdv admin password> --env POSTGRES_DB=postgres --env POSTGRES_INITDB_ARGS=-E UTF-8 --env POSTGRES_HOST_AUTH_METHOD=password --env PGDATA=/var/lib/postgresql/data/tdv --name tdv0.0clustercache tibco/tdvcache:0.0 postgres
 
docker run -itd --cpus 1.0 --restart unless-stopped --memory 2g --network tdv-bridge -p 9408:9408 -v tdv0.0clusterrepo-vol:/var/lib/postgresql/data --env POSTGRES_USER=<user> --env POSTGRES_PASSWORD=<tdv admin password> --env POSTGRES_DB=postgres --env POSTGRES_INITDB_ARGS=-E UTF-8 --env POSTGRES_HOST_AUTH_METHOD=password --env PGDATA=/var/lib/postgresql/data/tdv --name tdv0.0clusterrepo tibco/tdvrepo:0.0 postgres
 
docker run -itd --cpus 2.0 --restart unless-stopped --memory 8g --network tdv-bridge -p 9400-9403:9400-9403 -p 9405:9405 -p 9409:9409 -p 9300-9306:9300-9306 -p 9407:9407 -v tdv0.0cluster-vol:/opt/TIBCO --name tdv0.0cluster --env TDV_ADMIN_PASSWORD=<tdv admin password> --env TDV_MAX_MEMORY=7000 --env TDV_CACHE_HOSTNAME=tdv0.0clustercache --env TDV_REPO_HOSTNAME=tdv0.0clusterrepo tibco/tdv:0.0 tdv.server
 
To configure node 1 as timekeeper node on "tdv0.0cluster:9400" with cluster name "tdv0.0cluster”:
 
docker exec -it tdv0.0cluster /bin/bash -c $TDV_INSTALL_DIR/bin/cluster_util.sh -server tdv0.0cluster -port 9400 -user <user> -password <password> -create -clusterName tdv0.0cluster
Note: When launching a container, you can either give a password or use a password file that has the password stored in it. Refer to the section TDV Admin Password for ways to specify the Admin Password.
References:
Refer the table below for a description of the different options used in the above docker run command.
 
Option
Docker Help Reference
--restart
Used to configure the restart policy for a container.
-t
-i
Keep STDIN open even if not attached - https://docs.docker.com/engine/reference/run/
-d
Detach and run the container in background and print container ID - https://docs.docker.com/engine/reference/run/#detached--d
-v
(TDV Required) The tdv container requires a persistent storage area when running as a Docker container. See Sizing Guidelines for TDV for size recommendations.
Usage: -v <path to the file on the host machine>:<path where the file is mounted in the container>:<optional parameters>
Example: -v $CONTAINER_CACHE_VOLUME:$TDV_DATABASE_DIR
Note: mount point must have a valid volume existing before starting the TDV Container.
--cpus
(TDV Recommended) The tdv container works best with 2 CPUs/cores in general. See Sizing Guidelines for TDV for value recommendations.
-m
(TDV Required) The tdv container requires a mininum of 8GB of memory. Higher tdv workloads require more. See Sizing Guidelines for TDV for value recommendations.
<tdv-container-name>
Container name for your TDV Docker container. Recommendation is to have tdv in the name. Examples: tdv, tdv-1, tdv-2, tdv-dev, tdv-prod, etc
<repo-name>
Repository name for your TDV Docker image.
<image-name>
Recommendation is to use tdv. You can change this to any name.
<image-tag>
Recommendation is to use the TDV version for this. Example: 8.4
Linux
This section explains how to start a TDV Docker container on a Docker environment hosted on the Linux platform. The bridge, host and user specified bridge network options in Docker should work for a TDV Container on this platform.
TDV Docker container example
Resource Configuration: small (poc/demo) : 2 CPUs/cores, 8 GB memory, external container volume tdv-vol with 8GB persistent readable/writable storage.
TDV configuration: base port (9400), admin password (mandatory), server memory (default). Refer to the docker container files (Dockerfile.tdv, Dockerfile.tdv.repo and Dockerfile.tdv.cache) for TDV Docker image default values.
$ docker volume create tdv-vol
$ docker run -itd -v <volume>:<location> type=volume,source=tdv-vol, -env [TDV_ADMIN_PASSWORD=<PASSWORD>] [TDV_ADMIN_PASSWORD_FILE=<FILE with tdv admin password>] target=/opt/TIBCO --cpus=2.000 -m=8g --name tdv myrepo/tdv:8.5 Dockerfile.tdv.repo
Note: The above example is for starting the TDV repo. You must run a similar command for TDV server and cache.
MacOS
This section explains how to start a TDV Docker container on a Docker environment hosted on the MacOS platform. The bridge and user specified bridge network options in Docker should work for a TDV Container on this platform.
TDV Docker container example
Resource configuration: small (poc/demo): 2 CPUs/cores, 8 GB memory, external container volume tdv-vol with 8GB persistent readable/writable storage.
MacOS specific configuration: -p <host-port>:<container-port> for all DV ports exposed and --hostname=localhost
TDV configuration: base port (9400), admin password (mandatory), server memory (default). Refer to the docker container files (Dockerfile.tdv, Dockerfile.tdv.repo and Dockerfile.tdv.cache) for TDV Docker image default values.
$ docker volume create tdv-vol
$ docker run -itd -v <volume>:<location> type=volume,source=tdv-vol,target=/opt/TIBCO --cpus=2.000 -env [TDV_ADMIN_PASSWORD=<PASSWORD>] [TDV_ADMIN_PASSWORD_FILE=<FILE with tdv admin password>] -m=8g -p 9300:9300 -p 9301:9301 -p 9302:9302 -p 9303:9303 -p9304:9304 -p9305:9305 -p 9306:9306 -p 9400:9400 -p 9401:9401 -p 9402:9402 -p 9403:9403 --hostname=localhost --name tdv myrepo/tdv:8.5 Dockerfile.tdv.repo
Note: The above example is for starting the TDV repo. You must run a similar command for TDV server and cache.
 
References:
For Docker Desktop for Mac, refer https://docs.docker.com/docker-for-mac/networking/
For larger TDV size configurations refer to Sizing Guidelines for TDV.
Note:If you have issues connecting to your TDV Docker container (specifically accessing TDV via localhost and TDV port), then you may need to add "--hostname=<ip-or-hostname>" in addition to the other docker run options. The --hostname parameter sets the IP address or Hostname that the server listens to for client connections. This command may take a few seconds to execute.
Windows
This section explains how to start a TDV Docker container on a Docker environment hosted on the Windows platform. The bridge and user specified bridge network options in Docker should work for a TDV Container on this platform.
TDV Docker container example
Resource configuration: small (poc/demo): 2 CPUs/cores, 8 GB memory, external container volume tdv-vol with 8 GB persistent readable/writable storage.
Windows specific configuration: -p <host-port>:<container-port> for all DV ports exposed and --hostname=localhost or --hostname=<ip-or-hostname>
TDV configuration: base port (9400), admin password (mandatory), server memory (default). Refer to the docker container files (Dockerfile.tdv, Dockerfile.tdv.repo and Dockerfile.tdv.cache) for TDV Docker image default values.
$ docker volume create tdv-vol
$ docker run -itd -v <volume>:<location> type=volume,source=tdv-vol,target=/opt/TIBCO --cpus=2.000 -env [TDV_ADMIN_PASSWORD=<PASSWORD>] [TDV_ADMIN_PASSWORD_FILE=<FILE with tdv admin password>] -m=8g -p 9300:9300 -p 9301:9301 -p 9302:9302 -p 9303:9303 -p9304:9304 -p9305:9305 -p 9306:9306 -p 9400:9400 -p 9401:9401 -p 9402:9402 -p 9403:9403 --hostname=localhost --name tdv tdv:8.5 Dockerfile.tdv.repo
Note: The above example is for starting the TDV repo. You must run a similar command for TDV server and cache.
References:
For Docker Desktop for Windows, refer https://docs.docker.com/docker-for-windows/networking/
For larger TDV size configurations refer Sizing Guidelines for TDV
Note:
The TDV Docker image uses a Linux base OS. This means if you are running Docker on Windows then you need to make sure Docker is set to use Linux containers. For more details, see https://docs.docker.com/docker-for-windows/#switch-between-windows-and-linux-containers.
If you have issues connecting to your TDV Docker container (specifically accessing TDV via localhost and TDV port), then you may need to add "--hostname=<ip-or-hostname>" in addition to the other docker run options. The --hostname parameter sets the IP address or Hostname that the server listens to for client connections. This command may take a few seconds to execute.