Saturday, May 5, 2018

3. Learning How to build Best Docker images?

Containerization concept was available since 1978s in the UNIX. but the real usage and evaluation started from the year 2014 onward, a small community of docker open source organization started focus on it and developing it.

In the last post we had the un-official image then it went up the size up-to 3.8 GB. But same logic if we try on Oracle Linux 7-Slim version image it reduced 1 GB!!!

Use Layered approach for Oracle images

Most of the developers question how do we deliver it to end user when you create the containers for WebLogic. The best practice to use the layer approach for WebLogic applications. We have demonstrated with the following layer approach the whole stack is going to break down into two major parts:

  1. Read only 
  2. Read-write 
The latest image is on top which is only allow you to modify the content. where application jar/war/ear file will be deployed.
The bottom stack will be re-used by multiple developers to build their container and work with no-time spending that's the beauty of this contianerization technology.

Please refer to the Oracle White paper.
WebLogic docker image layers

Recently we had requirement to develop the containers of Oracle SOA. if we take the old stack it is not flexible enough to support the requirements. Always prefer to use the latest installers, Oracle SOA 12c is flexible for supporting Containerization.

Use the yum -y clean

When you install any of the dependent libraries that used for WebLogic or database or SOA software in the container. These libraries first pulled from the repo to a buffer, then installation process happen. Better to clean this junk after installation completed.

Preferable option to use official images
When you search for any image then you will be finding many images which are publicly available. Out of the images list there could be official select that one, which is more reliable than others.

Use Dockerfile to build images

Remember that in Dockerfile every instruction line is going to create a container. Each container will be stored in the docker engine just similar to the SVN repository that have id. To build docker image by write single RUN command with slash for separating commands for multiple commands to execute on temporary container.

Use docker-compose instead of lengthy docker run

using docker-compose you will be saving time to write lengthy  docker run commands. If you store the run command into compose file you will have more advantages you can build the docker image and also run the image as container in single go. You can modify the ports and other values to create more number of containers.

Multi purpose of docker-compose commands
Write your experiences/queries with the docker and docker-compose in the below give comment box. We are happy to help you in containerizing your environments.


Oracle WebLogic Server on Docker Containers

1 comment:

  1. This is extremely great information for these blog!! And Very good work. It is very interesting to learn from to easy understood. Thank you for giving information. Please let us know and more information get post to link. weblogic administrator training


Blurb about this blog

Blurb about this blog

Essential Middleware Administration takes in-depth look at the fundamental relationship between Middleware and Operating Environment such as Solaris or Linux, HP-UX. Scope of this blog is associated with beginner or an experienced Middleware Team members, Middleware developer, Middleware Architects, you will be able to apply any of these automation scripts which are takeaways, because they are generalized it is like ready to use. Most of the experimented scripts are implemented in production environments.
You have any ideas for Contributing to a Middleware Admin? mail to me