Closed vtanner11 closed 6 years ago
Is there a sample Dockerfile or install.sh file available?
I would suggest you install the db-client in a different layer. You can have a look how I do it with the mqclient (https://github.com/dennisseidel/ibm-integration-bus-docker-bestpractice/tree/master/iib-mqclient). This allows you to rebuild only the relevant parts of your image and you are not forced to rebuild for example the complete IIB image but only the db2 client part when you update the client.
So the iib image would be build from two images - mq and db2? I will need all three - mq, iib and db2.
Well first the question is do you need an mq or a mq client in the iib container. But in your example you might think about writing 3 Dockerfiles:
You should not let these dependency chains to far, so it might make some sense to put iib and mq into one image and add db2 in to a dependent image.
But the decision how to design your images is really based on your ecosystem, and how you want to use the image.
You can use them as empty containers, that are filled manually at runtime (that is perfectly fine) -> then you would build the image itself more like this image.
Or you actually want the container when it starts/restarts to deploy you application (bar file) automatically configure and connect to a database. Then you can have a look at a sample (which is far from perfect!) in my repo.
So to actually answer your first question: yes you can perfectly do it, how you do it really depends on your use cases and your ecosystem you need to support.
Great info from @denseidel - I think this one is answered.
Yes - this is absolutely possible - you would need to add in the right commands in the Dockerfile to add and setup the client, which would then be available as normal inside the container.