Code Monkey home page Code Monkey logo

db2-docker-1's Introduction

pre-requisites

It seems like DB2 doesn't like running on the AUFS back-end, so you should switch to devicemapper instead.

Maybe this is an unrealistic request, I'm not sure.

boot2docker

boot2docker is cool, but it hides your docker settings away, so in order to switch to the devicemapper backend you would do:

boot2docker ssh

(inside boot2docker)

sudo echo EXTRA_ARGS="--storage-driver=devicemapper" > \
    /var/lib/boot2docker/profile

(ctrl-d to exit)

boot2docker restart

Also, hit up boot2docker ip for the ip address -- you'll need that later.

build

docker build -t db2-express-c .
docker run -P --privileged=true -it db2-express-c

(inside docker)

./prepare.sh

This will start the DB2 instance and create a sample database.

(back in the shell)

docker ps | grep db2-express-c:0.0.1

(note hash, e.g. e001bc1de596)

docker stop e001bc1de596
docker commit e001bc1de596 db2-express-c:0.0.2

Thanks to rieske for the build script.

run

it's kind of a doozy:

docker run --privileged=true -P -t -d -u db2inst1 jeffbonhag/db2-express-c:0.0.1 /bin/bash -c "source ~/sqllib/db2profile && db2start && read -p Waiting..."

login!

username: db2inst1
password: db2inst1
host: localhost (or whatever `boot2docker ip` told you)
port: what `docker ps` said
database: SAMPLE

That's all!

db2-docker-1's People

Contributors

jbonhag avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.