Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Deploying Java EE Apps to IBM Containers

DZone's Guide to

Deploying Java EE Apps to IBM Containers

Do you have a Java EE application which is running successfully on your laptop and now you want to run it in a Docker container? Maybe you then want to take that container and deploy it to IBM Containers? What if that application requires access to a database? The following video tutorials can help you in getting started.

· Cloud Zone
Free Resource

Site24x7 - Full stack It Infrastructure Monitoring from the cloud. Sign up for free trial.

Do you have a Java EE application which is running successfully on your laptop and now you want to run it in a Docker container? Maybe you then want to take that container and deploy it to IBM Containers? What if that application requires access to a database?

The following videos can help you in getting started.

The first video demonstrates how to extend the websphere-liberty:kernel Docker image available in the Docker Hub public registry to build a new image. The new image adds the DayTrader sample application and the WebSphere Liberty features that it requires. DayTrader requires access to a DB2 database which, in this first scenario, is also running on the local machine.

Now we have learned how to package the application as a Docker image. Let’s see how we can take that same image and run it on IBM Containers, part of IBM Bluemix.

The following video demonstrates how to create a Secure Gateway Service in Bluemix and configure that with the DB2 database running on an on-premise system. The DayTrader application is then pushed to the IBM Containers registry and run. The application accesses the on-premise DB2 database via the Secure Gateway Service. Note that, in this video, an application is used to bind the Secure Gateway service to the container, but this step is no longer required. It is now possible to bind the service directly to the container when the container is created.

We have learned how to run the DayTrader application in IBM Containers with DB2 running on-premise. Now let’s run DB2 also in a container.

The final video demonstrates how to pull the websphere-liberty:kernel and ibmcom/db2express-c docker images from Docker Hub and build a new WebSphere Liberty image with the DayTrader application. The Liberty and DB2 containers share a network so that they can communicate with each other.


Site24x7 - Full stack It Infrastructure Monitoring from the cloud. Sign up for free trial.

Topics:
java ee ,websphere ,liberty ,docker ,db2 ,video ,tutorial

Published at DZone with permission of Kavi Suresh, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}