Installation and Upgrade Guide > TDV Docker Container > Runtime TDV Container Configuration - Common Examples > Change TDV Base Port
 
Change TDV Base Port
To change the TDV Docker container's base port you will need to reconfigure TDV and create a new TDV Container.
Example (change base port from 9400 to 10400):
a. Before starting the TDV Container:
To map HOST_PORT to internal TDV container port TDV_BASE_PORT (default 9400)
-p HOST_PORT
To change internal TDV container port to 10400 instead of default 9400. Host port is also 10400 if "-p" is not set.
--env TDV_BASE_PORT=10400
a. If the TDV Container is already running:
1) Use TDV Studio (same version of TDV as your TDV Docker container) to connect to your TDV Docker container. Login to the TDV Studio using the TDV admin user "admin" and your TDV admin password along with the appropriate TDV base port.
2) Goto Administration > Configuration
3) Search for "Port ("
4) From the search result, select "Port (On Server Restart): 9400".
5) Change your base port value to "10400”. Apply your Changes.
Note: "Port (Current)" shows your current TDV Server base port configuration.
"Port (On Server Restart)" shows your future TDV Server base port configuration. This only takes affect when you restart the TDV Server though.
6) Now click on the "Ok" button to close the pop-up window.
7) Logout of the TDV Studio client.
8) Stop the TDV Docker container where your TDV Server is running.
docker stop <tdv-container-name>)
9) Start a new TDV Docker container with the new base ports and reuse the TDV Docker volume used for the container from step #8.
docker run -itd -p 10300:10300 -p 10301:10301 -p 10302:10302 -p 10303:10303 -p 10304:10304 -p 10305:10305 -p 10306:10306 -p 10400:10400 -p 10401:10401 -p 10402:10402 -p 10403:10403 -env [TDV_ADMIN_PASSWORD=<PASSWORD>] [TDV_ADMIN_PASSWORD_FILE=<FILE with tdv admin password>] -v <volume>:<location> type=volume,source=tdv-vol,target=/opt/TIBCO --cpus=2.000 -m=8g --name tdv_new myrepo/tdv:8.5 Dockerfiletdv.server
Note: Alternately you can also run the quick start script run_tdv_container.sh with the appropriate parameters. Refer to Launching TDV Containers (Single Node) - Using Quick Start Script for instructions on how to use the script.
Note: The above example expects a valid tdv-vol, default docker network bridge works on your Docker host, and that you already have a valid TDV Docker image that exists.
It is also expected that you reuse your TDV Container volume, otherwise your base port and any other TDV metadata changes will be lost. Basically, if you specify a new TDV volume, then the TDV Container will create a brand new, default TDV Container based on your TDV Docker image defaults (i.e. default base port and server settings).