随便记录一下db2 docker,目前还不知道怎么在启动时自动执行sql创建表和插入数据。
docker-compose.yml file
db2: image: ibmcom/db2 privileged: true environment: - LICENSE=accept - DB2INST1_PASSWORD=abc123 - DBNAME=testdb volumes: - "/usr/local/db2:/database" ports: - "50000:50000"
命令行启动
docker run -d -p 50000:50000 --name db2 --privileged=true -e DB2INST1_PASSWORD=abc123 -e DBNAME=testdb -e LICENSE=accept -v /usr/local/db2:/database ibmcom/db2
db2其它命令
su - db2inst1 db2pd - db2level db2 list db directory
标签:50000,LICENSE,accept,随便,docker,db2,DBNAME From: https://www.cnblogs.com/panda4671/p/16658959.html