So - where do we start from ? Let's assume you have docker installed on your computer already. Simply create a directory called docker (name it as you want it to be named), and inside issue the git clone command for the docker of the tim-dockerbuilder: https://github-isl-01.ca.com/merjr01/tim-dockerbuilder

In this step, we create the TIM Version directory, and place the binaries of the required release inside. Note that only the TIM binary for RedHat/CentOS 6.x can be used, so the other binary is deleted.

The Important files here are timInstall.bin, ca-eula.en.txt and the CA-APM-TIM-public_key.txt files.

This is all that is required to prepare the tim-dockerbuilder. We can now create a TIM Image and start it in a container.

jmertin@antigone:~/docker/tim-dockerbuilder$ ./TIMImage_builder.sh

>>> Which TIM version do you want to integrate into the image ?

>>> Available Versions are listed below:

===============================================================

* tim10.1

===============================================================

>>> Please copy & paste the right version: tim10.1

===============================================================

>>> How many TIM Worker processes should be activated [4]: 2

===============================================================

>>> How do you want to name the Image [caapm/tim10.1]:

*** Image Name set to: caapm/tim10.1

===============================================================

!!! You need to accept the Eula in tim10.1/ca-eula.en.txt !

>>> Do you accept the Eula [y/n]: y

===============================================================

>>> How do you want to name the Container [tim10.1]:

*** Container Name set to: tim10.1

===============================================================

>>> Which Docker Host physical network interface will be used

>>> as SPAN Port. Note that the interface will be made exclusively

>>> available to the container running the tim10.1, and will not

>>> be usable by the Docker Host or any other container !

>>> Use ifconfig to identify a suitable interface !

Which interface to use: [No Default]: dummy0

===============================================================

For the following, keep in mind that the TIM uses by default

port 80, 81 8080 and 443. These are the ports the TIM will

run inside the Docker container. If any of these ports is

already in useon the host system, it cannot be used by the

docker-proxy.

===============================================================

>>> Which port do you want to map the HTTP Port 80 [80]: 9080

===============================================================

>>> Which port do you want to map the HTTP Port 8080 [8080]:

*** Port 8080 mapped to 8080

===============================================================

>>> Which port do you want to map the HTTP Port 81 [81]:

*** Port 81 mapped to 81

===============================================================

>>> Which port do you want to map the HTTPS Port 443 [8443]: 9443

>>> Options for this Docker Image Build

===============================================================

TIM Version: tim10.1

TIM Workers: 2

Image name: caapm/tim10.1

Exposed ports: 8080 8443 81 80

Container Name: tim10.1

Host SPAN Int.: dummy0

Guest SPAN Int.: span0

Port 80 mapped to: 9080

Port 81 mapped to: 81

Port 8080 mapped to: 8080

Port 8443 mapped to: 9443

===============================================================

>>> Proceed [y/n]: y

*** Generating CA_AUTOMATION file: OK.

*** Generating Dockerfile: OK.

*** Creating Container start script: OK.

*** Creating Container access script: OK.

===============================================================

>>> Create image [y/n]: y

Hitting y now will create the Image including the container start script, and the script allowing to access the container through a shell.Regarding the network interface we will hijack into the container, we used the dummy0 interface as we have none available on this laptop the test is taking place.

Note that from now on, the configuration of this TIM Image exists inside the cfgs directory, and can be used to speed up the process:

./TIMImage_builder.sh cfgs/tim10.1.cfg

You will be at the same position to create the image again. This - by example to actually create a new image with all CentOS updates installed.

The Build Process is quite long, so not included into this blog - but at the end - one should see a:

[......]

Step 20 : ENTRYPOINT /sbin/init

---> Running in c59abe037fbc

---> 98f896e55522

Removing intermediate container c59abe037fbc

Successfully built 98f896e55522

The image has been built. Time to start the container (Note that all configuration has been integrated into the startup-script.