Skip to content

Instantly share code, notes, and snippets.

@smola
Last active February 2, 2021 10:21
Show Gist options
  • Save smola/a322989276369e7abb6d2eab63f9fe60 to your computer and use it in GitHub Desktop.
Save smola/a322989276369e7abb6d2eab63f9fe60 to your computer and use it in GitHub Desktop.
Run IBM DB2 Express-C with Docker
#!/bin/bash
set -eux
#
# Just give up on using packages from IBM.com and their nighmare setup process.
#
# Use Docker: https://hub.docker.com/r/ibmcom/db2
#
CONTAINER=mydb2
DBNAME=testdb
PASSWD=root
PORT=50000
exec docker run -itd \
--name $CONTAINER \
--privileged=true \
-p $PORT:50000 \
-e LICENSE=accept \
-e DB2INST1_PASSWORD=$PASSWD \
-e DBNAME=$DBNAME \
-v /db2:/database \
ibmcom/db2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment