Downloading the IBM Db2 REST Service from the IBM Cloud Container Registry
The IBM® Db2 REST service container is hosted on the IBM Cloud® Container Registry.
About this task
Before downloading the REST service container, you need to configure your system to access the IBM Cloud Container Registry.
Procedure
Example
docker run -it --net=host -e DB2REST_DBHOSTNAME=mydb2.hostname.com
-e DB2REST_DBPORT=50001 -e DB2REST_SSLCONNECTION=true -e DB2REST_DBNAME=TESTDB -e DB2REST_SSLKEYSTOREPATH=/opt/ibm/dbrest/ssl/server.kdb
-e DB2REST_SSLKEYSTASHPATH=/opt/ibm/dbrest/ssl/server.sth-e LICENSE=view --name=db2rest icr.io/obs/hdm/db2rest:latest-amd64
For
Windows and Mac OS
X:
docker run -it --hostname <Your REST server hostname> -p 50050:50050 -e DB2REST_DBHOSTNAME=mydb2.hostname.com
-e DB2REST_DBPORT=50001 -e DB2REST_SSLCONNECTION=true -e DB2REST_DBNAME=TESTDB -e DB2REST_SSLKEYSTOREPATH=/opt/ibm/dbrest/ssl/server.kdb
-e DB2REST_SSLKEYSTASHPATH=/opt/ibm/dbrest/ssl/server.sth-e LICENSE=view --name=db2rest icr.io/obs/hdm/db2rest:latest-amd64
Setting token expiry at the server level
The request for authentication accepts an expiry
time. In some environments, the administrator may prefer a fixed value. Add the following to the
docker run command to specify a fixed
expiry:
-e DB2REST_EXPIRY=30m