Skip to content

Instantly share code, notes, and snippets.

@mbigatti
Last active May 4, 2017 15:33
Show Gist options
  • Save mbigatti/bef1826f05e6011c6573ea6ee22b6563 to your computer and use it in GitHub Desktop.
Save mbigatti/bef1826f05e6011c6573ea6ee22b6563 to your computer and use it in GitHub Desktop.
# install and run db2 docker image
# see: https://hub.docker.com/r/ibmcom/db2express-c/
docker pull ibmcom/db2express-c
docker create -v $(pwd):/dbdata --name dbstore ibmcom/db2express-c /bin/true
docker run -it -p 50000:50000 -e DB2INST1_PASSWORD=db2inst1-pwd -e LICENSE=accept --name db2 --volumes-from dbstore ibmcom/db2express-c:latest bash
su - db2inst1
# -> db2start
# --> db2 create database WWSCM on /dbdata dbpath on /dbdata
# to restore access to the container
docker start db2
docker attach db2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment