DB2 Container on QNAP NAS
Jump to navigation
Jump to search
Run DB2 Docker Container
Login to QNAP NAS
... with running Container Station
ssh qnap mkdir /Docker/db2server cd /Docker/db2server
Create file .env_list
PUID=1001 PGID=100 LICENSE=accept DB2INSTANCE=db2inst1 DB2INST1_PASSWORD=my-pw DBNAME=mspr BLU=false ENABLE_ORACLE_COMPATIBILITY=false UPDATEAVAIL=NO TO_CREATE_SAMPLEDB=false REPODB=false IS_OSXFS=false PERSISTENT_HOME=false HADR_ENABLED=false ETCD_ENDPOINT= ETCD_USERNAME= ETCD_PASSWORD=
Run Container
docker run -h db2server --name db2server --restart=always --detach --privileged=true -p 50000:50000 --env-file .env_list -v /share/Docker/db2server:/database icr.io/db2_community/db2
Setting PERSISTENT_HOME=true would be nice, but container users do not have access to volumes :(
Connect to the instance database
db2 catalog tcpip node qnap remote qnap server 50000 db2 catalog database mspr as qmspr at node qnap db2 connect to qmspr user db2inst1 using my-pass