docker db2

https://hub.docker.com/r/ibmcom/db2

docker run -itd --name mydb2 --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=testdb -e DBNAME=testdb -v /scan/db2docker:/database ibmcom/db2

docker start mydb2

docker exec -ti mydb2 bash -c "su - db2inst1”


Docker ps -a


Docker rm mydb2

/opt/ibm/db2/V11.5/bin

$ docker exec -ti mydb2 bash -c "su - db2inst1"
Last login: Fri Jun  5 07:39:14 UTC 2020

 

$ db2
(c) Copyright IBM Corporation 1993,2007
Command Line Processor for DB2 Client 11.5.0.0

.....


To list the current command option settings, type LIST COMMAND OPTIONS.

For more detailed help, refer to the Online Reference Manual.

db2 =>

 

 

你可能感兴趣的:(DB,docker)