TIBCO on Docker: How to create, instantiate and start a TIBCO BusinessWorks Container Edition (BWCE) application Docker Image?

When trying to create a Docker application image based on a TIBCO BusinessWorks Container Edition (from now on TIBCO BWCE) application (helloWorld_1.0.0.ear) and a corresponding Dockerfile one will notice that the base docker image (tibco/bwce:latest) has not been made publicly available by TIBCO.


The fact that the base docker image is not publicly available will result in the following error:

MacBook-Pro:Downloads ruben.middeljans$ docker build -t helloworld .
Sending build context to Docker daemon 198.2MB
Step 1/3 : FROM tibco/bwce:latest
repository tibco/bwce not found: does not exist or no pull access

The solution is as simple as it sounds, we need to create the TIBCO BWCE Base Docker Image ourselves. TIBCO Business Studio Container Edition (Eclipse based IDE) ships by default with the necessary build pack and scripts for this.

1. Download the TIBCO BWCE runtime file (bwce_cf.zip) from http://edelivery.tibco.com (account is required).
2. Copy bwce_cf.zip to <TIBCO_HOME>/bwce/<version>/docker/resources/bwce-runtime folder.
3. Navigate to <TIBCO_HOME>/bwce/<version>/docker.
4. Run the following command from a terminal session:

MacBook-Pro:Downloads ruben.middeljans$ docker build -t tibco/bwce:latest .

Notice that the Docker image is based on Debian Linux (Jessie release/tag).

5. The TIBCO BWCE Base Docker Image has now been created and tagged as “tibco/bwce:latest” in your local Docker registry.
6. Verify the creation by running the following command (or use Kitematic):

MacBook-Pro:docker ruben.middeljans$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
tibco/bwce latest d299050b64b6 About a minute ago 353MB
debian jessie 62a932a5c143 3 weeks ago 123MB

7. Now when we re-run the initial command to create a Docker application image for our TIBCO BWCE application (helloWorld_1.0.0.ear) we see that the creation will succeed:

MacBook-Pro:Downloads ruben.middeljans$ docker build -t helloworld .
Sending build context to Docker daemon 198.2MB
Step 1/3 : FROM tibco/bwce:latest
 ---> d299050b64b6
Step 2/3 : MAINTAINER tibco
 ---> Running in e5ba0d97eb2a
 ---> ee8ceb794ac8
Removing intermediate container e5ba0d97eb2a
Step 3/3 : ADD helloWorld_1.0.0.ear /
 ---> 9d3fb3c4e71a
Removing intermediate container 13cda99beb95
Successfully built 9d3fb3c4e71a
Successfully tagged helloworld:latest

8. Run the following command to instantiate and start the Docker BWCE application image (helloworld:latest):

MacBook-Pro:Downloads ruben.middeljans$ docker run --name "helloWorldInstance" -p 8080:8080 -d helloworld
2d52cbfc173125200bd4d2334399fd1bbb92033b4145462a69ffe71c1c722f0e

9. Verify the creation by running the following command (or use Kitematic):

MacBook-Pro:Downloads ruben.middeljans$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2d52cbfc1731 helloworld "/scripts/start.sh" 3 minutes ago Up 3 minutes 0.0.0.0:8080->8080/tcp helloWorldInstance

9. Since the helloworld application contains a RESTful API we can fire up a browser and head to the Swagger UI (which TIBCO BW6 and BWCE generates by default for each RESTful API, awesome!).

http://localhost:8080/swagger

 

 

Advertisements

One comment

  1. […] and start the Docker BWCE application image (helloworld:latest) that we created in one of my previous blog posts. Pay attention to the fact that we are now exposing port 8080 on the Docker container as port 8081 […]

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: