Why Use Docker with Payara Platform? Benefits for your Business

Photo of Andrew Pielage by Andrew Pielage

There's a lot of noise revolving around Docker at the moment, and with the current industry focus on the cloud, there's a good reason for that.


I hope you would already know why you might want to use Payara Platform in your business, so in this blog I'm going to focus more on why you'd specifically want to use it with Docker in a "business" context. For a start, if you're unfamiliar with Docker, please refer back to our introductory blog: What is Docker and How is it Used with the Payara Platform for a primer.


 The Payara Platform & Docker -   Resources


It's Lighter than a "Full-Fat" Virtual or Physical Machine

In a micro-services architecture, spinning up a whole virtual or physical machine to run a micro-service can be a bit overkill. As will have been mentioned in the "What is Docker?" blog, Docker containers are not full Virtual Machines, and so they can use fewer resources than VMs by being more efficient with the resources they are provided (even when idle, a full OS is typically doing quite a bit in the background). Using fewer resources can potentially help you save money by reducing the need to run multiple VMs in the cloud or on your servers.


It Can be Simple to Scale

Docker containers are lighter than full VMs so that you can run more of them per machine. As starting a container is similar to simply starting up a process, Docker can be easily taken advantage of to allow scalable architectures.


There are many solutions already using Docker, with some of the most well-known ones being OpenShift, Amazon ECS, Kubernetes, and Docker Swarm. Each of these solutions use Docker in some capacity and are touted for their scalability; with a bit of wrangling you can even get them to auto-scale to demand.


We should have a separate blog coming at a later date as to why you may want to use Kubernetes with Docker - keep your eyes peeled! In a single sentence though, combining Kubernetes & Docker with micro-services architectures allows for the creation of very easy to scale and update environments.


It's Almost Tailor-Made for Micro-Services

Those paying attention may have noticed that the previous two points about the Docker containers being both small and scalable - bywords of the micro-services architecture. If your application is designed in the micro-services style (key point! You can't jam a square peg into a round hole without ruining the peg or the hole), you can run each of your micro-services in separate Docker containers, allowing you to provide good separation of your micro-service containers. Running them in separate containers also lets you edit and scale your micro-services independently of one another.


You Can Essentially Put Your Setup into Version Control

In a certain sense, using the Payara Platform with Docker allows you to put your setup of Payara Platform (as in the Dockerfile) into version control. Using pre-boot & post-boot command files or the asadmin CLI, you can set up your Dockerfile to perform the setup of the Payara Platform instance and do any deployments upon creation of the Docker container, and this can afford easier development by multiple people, as well as allowing you to track and revert changes.


You can even extend this by having your Dockerfile download a particular version of the Payara Platform, affording you the ability to make upgrading the version of Payara Platform that you're using as easy as changing a number (assuming nothing breaks of course! But then you can just revert the change; you see? It's all connected...)


With the availability of Docker Hub and its integrations with GitHub & Bitbucket, it's not a stretch to make an argument for this.


Wrapping Up

This was a very high-level view of why you may want to consider using Docker with Payara Micro for your next or current application - by all means, this is not an exhaustive list, just as much as it likely doesn't apply to all situations! It should hopefully though spark your interest and give you an idea of what you could possibly achieve using Docker with Payara Micro.  If you're already using Payara Micro with Docker, we'd love to hear what you're doing with it in the comments below! 


Click here to learn more about Payara Micro for containerized Java EE (Jakarta EE) microservices deployments or get started with Payara Micro:


 Download Payara Micro