The README file can be found in db2-install/expc/README.md
angoca / db2-docker Goto Github PK
View Code? Open in Web Editor NEWDocker image to run DB2 LUW
License: MIT License
Docker image to run DB2 LUW
License: MIT License
The README file can be found in db2-install/expc/README.md
It would be good if the kubernetes yaml file for this image is documented somewhere. I am trying to use this with kubernetes and mount a persistent volume for the /home directory.
The problem of other images is the instance name which is a pattern.
I'm trying to get a DB2 database up with your image from https://registry.hub.docker.com/u/angoca/db2-sample/.
The instructions say to start it with docker run, but that doesn't do anything, it's just bash. How do I get a database up and connect to it?
Hello @angoca, first of all, thanks for all our contributions to the DB2 community, I'm using all your Nagios scripts to monitor db2.
I've tried to use your container but DB2 isn't starting at all
db2inst1@c53ab027d2dc:~$ db2start
SQL1042C An unexpected system error occurred.
DB2 Diag logs:
2016-02-05-21.17.53.231400+000 I17824E382 LEVEL: Warning
PID : 8012 TID : 140638486521728 PROC : db2start
INSTANCE: db2inst1 NODE : 000
HOSTNAME: c53ab027d2dc
FUNCTION: DB2 UDB, base sys utilities, sqleReleaseStStLockFile, probe:14796
MESSAGE : Released lock on the file:
DATA #1 : String, 39 bytes
/home/db2inst1/sqllib/ctrl/db2strst.lck
In fact, I've tried your container because I'm facing the same issue on my project, a ansible role to install, configure and create DB2 databases. The issue is faced only when tested on docker.
My docker host is VMware Photon OS
Do you know what this could be?
Hi,
I install the image unprivileged on port 50001:
docker run -it --ipc="host" --cap-add IPC_LOCK --cap-add IPC_OWNER --name="db2inst1" -p 50001:50000 angoca/db2-install
In the container I exec createInstance.
When I try to connect with squirrel to db2 result in the error in the object.
url: jdbc:db2://localhost:50001/db2c_db2inst1
I use Mac.
can you tell me what I wrong?
thans
sudo docker run -i -t --privileged=true --name="db2inst1" -p 50000:50000 -v /tmp/db2:/home angoca/db2-instance:instance-server_t. I get:
exec: "db2": executable file not found in $PATH2015/02/17 14:28:14 Error response from daemon: Cannot start container 65c8c962f0295984be08c0c119a5a2e99c6c686b088bde64f547ff8d7562d93e: exec: "db2": executable file not found in $PATH
Any idea what might be wrong?
The most recent version of DB2, not an old Fixpack
Based on Ubuntu, a supported distribution (CentOS is not supported)
According to the blog http://db2indocker.blogspot.com/2015/04/db2-do-not-start-in-un-privileged.html there is a new way to run a container with DB2.
The following repository could give ideas about how to improve this repository
This new image will be based on bryantsai repo
https://github.com/bryantsai/db2-docker
This is not a fork, because it will be created from scratch (to learn)
First of all great work on this repo and for helping DB2 being more user friendly.
Something i did notice which could be improved is the size of the images. For example the base install one is around 3GB according to https://imagelayers.io/?images=angoca%2Fdb2-install:latest.
You should be able to great reduce this size by combining some RUN commands. It does make the Dockerfile a little less readable but you have plenty of comments should it should be ok and the reduction should be worth it.
A good start would be to combine commands that download and ones that delete the downloaded file. If you do this in separate run commands the file won't be accessible in the above layers but it will still be there physical in the download layer.
So for example combine:
# Download the installer.
## URL to download the installer. The link is obtained from an article in the Wiki
## https://github.com/angoca/db2-docker/wiki/db2-link-expc
## That article should contain a valid link as the last line.
## If the link is not valid, you can modify the wiki.
RUN /tmp/download
# Extract the installer and delete the tar file.
RUN cd /tmp && \
tar -zvxf ${DB2_INSTALLER} && \
rm ${DB2_INSTALLER}
to:
# Download the installer.
## URL to download the installer. The link is obtained from an article in the Wiki
## https://github.com/angoca/db2-docker/wiki/db2-link-expc
## That article should contain a valid link as the last line.
## If the link is not valid, you can modify the wiki.
# Extract the installer and delete the tar file.
RUN /tmp/download && \
cd /tmp && \
tar -zvxf ${DB2_INSTALLER} && \
rm ${DB2_INSTALLER}
This should reduce the image by around 595MB.
Hello! I do not know docker well yet, but from what I learned, one cannot "re-run" a container.
So, from my perspective which is probably wrong, there are but two approaches to using "db-instance".
Is there another way to use the image AND provide persistense? Without using "commit", every time we "run" or "start" the image, the container will be in an "initial" state: no user created, no db2start on a path, etc; worse, createInstance fails if the database already exists. Say, I would like to simply start up a DB2 TCP server and use the database created in a previous "run"; I start it, but now I cannot use createInstance! Well, I can and it even does something, but the TCP server is not started, and somewhere along the way I see an error message about database already being there. I suppose I could simply use db2start but it's not on a path and I am not even sure the container is ready to use it in this state, maybe it still requires some preparations, like creating a user.
In principle, the (2) approach works for me. It's bad from the automation point of view, though: I will have some script on a first run to run the image with keeping stdin open, and DON'T wait for completion lest the wait will be infinite; but, not waiting for completion, I will still want to wait for completion, to understand when it's time to (automatically, not manually) commit the container and maybe stop it. Or, I could have the script run the image without keeping stdin open and wait for completion, that's much easier, but this stores in a config that "this container does not require keeping stdin open", and when later I "start" it, guess what? it simply shuts down by itself, since no commands come from the user ("start -a -i" does not help). And if there is a way to "run" the container without "-t -i" and then somehow turning them ON in config for subsequent "start", I am not aware of it :(
Maksim
Hi,
I'm just running your docker image for the first time. The createInstance script runs db2isetup fine, but then the db2start command fails.
I've logged at the /tmp/db2isetup.log and there is no indication of failure there.
Wondered if you could give me any clues ?
Thanks for your help,
Peter
sudo docker run -i -t --privileged=true --name="db2inst1" -p 50000:50000 angoca/db2-instance
root@5a5150c2bf17:/tmp/db2_conf# ./createInstance
The execution completed successfully.
For more information see the DB2 installation log at "/tmp/db2isetup.log".
SQL1042C An unexpected system error occurred.
ENTRYPOINT db2
The port of a container should have a matching with the host port.
db2inst1@6f14ccec1439:~$ db2licm -l
Product name: "DB2 Advanced Enterprise Server Edition"
Expiry date: "Expired"
Product identifier: "db2aese"
Version information: "11.1"
Enforcement policy: "Soft Stop"
Product name: "DB2 Enterprise Server Edition"
Expiry date: "Expired"
Product identifier: "db2ese"
Version information: "11.1"
Enforcement policy: "Soft Stop"
Product name: "DB2 Advanced Workgroup Server Edition"
Expiry date: "Expired"
Product identifier: "db2awse"
Version information: "11.1"
Enforcement policy: "Soft Stop"
Product name: "DB2 Workgroup Server Edition"
Expiry date: "Expired"
Product identifier: "db2wse"
Version information: "11.1"
Max amount of memory (GB): "128"
Max number of cores: "16"
Enforcement policy: "Soft Stop"
Product name: "DB2 Direct Advanced Edition"
Expiry date: "Expired"
Product identifier: "db2dae"
Version information: "11.1"
Product name: "DB2 Direct Standard Edition"
Expiry date: "Expired"
Product identifier: "db2dse"
Version information: "11.1"
Max amount of memory (GB): "128"
Max number of cores: "16"
Product name: "IBM DB2 Developer-C Edition"
Expiry date: "Expired"
Product identifier: "db2dec"
Version information: "11.1"
Product name: "dashDB"
Expiry date: "Expired"
Product identifier: "dashdb"
Version information: "11.1"
Enforcement policy: "Soft Stop"
Could you update license or provide instruction how to change it?
USER
Trying to deploy on Mac (macOS High Sierra)
Created a /db2 folder on the host, added /db2 mount point via Docker - Preferences
Ran the following -
docker run -i -t --privileged=true --name="db2inst1" -p 50000:50000 -v /db2:/home angoca/db2-instance
./createInstance
su - db2inst1
. ~db2inst1/sqllib/db2profile
su - db2inst1
db2inst1@ace6e0af1103:~$ db2start
SQL1042C An unexpected system error occurred.
db2 diag log shows -
2017-12-13-19.41.42.838165+000 E7247E1026 LEVEL: Error (OS)
PID : 7930 TID : 140601058523008 PROC : db2star2
INSTANCE: db2inst1 NODE : 000
HOSTNAME: ace6e0af1103
FUNCTION: DB2 UDB, oper system services, sqloopenp, probe:80
MESSAGE : ZRC=0x870F0002=-2029060094=SQLO_BPSE "Debug logic error detected"
DIA8501C A buffer pool logic error has occurred.
CALLED : OS, -, open OSERR: EINVAL (22)
DATA #1 : Codepath, 8 bytes
5:11:18:20:24:40
DATA #2 : File name, 55 bytes
/home/db2inst1/sqllib/ctrlha/.db2.000.ace6e0af1103.pgrp
DATA #3 : SQO Open File Options, PD_TYPE_SQO_FILE_OPEN_OPTIONS, 4 bytes
SQLO_CRTREV, SQLO_READWRITE, SQLO_SHAREWRITE, SQLO_FORCE_NON_BUFFERED, SQLO_WRITETHRU, SQLO_SECURE
DATA #4 : Hex integer, 4 bytes
0x000001B4
DATA #5 : signed integer, 4 bytes
0
DATA #6 : Hex integer, 4 bytes
0x00004000
DATA #7 : String, 105 bytes
Search for ossError*Analysis probe point after this log entry for further
self-diagnosis of this problem.
There are three supported platforms in Linux
with version 11.1, the prereqs always checks for pure scale
after db2profile; db2start
This will allow to have a control of all instances in all containers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.