WInDocks is a port of Docker’s open source to Windows. WinDocks supports all editions of Windows 8, Windows 10, Windows Server 2012, and Windows Server 2016, and now includes a new Windows container (similar to the scratch container for Linux). The new Windows container is designed to support “container ready” executables, and works great with Tomcat, Jetty, Nginx, and Node.js.

In this article we’ll look at containers for Java and Tomcat, based on the free WinDocks Community Edition.

Comparing WinDocks to Microsoft’s Windows Server 2016 bits

The WinDocks setup is an automated 15 minute install on any edition of Windows OS family. WinDocks uses standard Docker commands which can be run locally or from a remote client. In this article we’ll use a local client on a Windows 8 home edition laptop as our container server!

Windows containers behave like Linux containers, with speed, portability of containers and images, and great economy. A survey of WinDocks customers shows an average reduction in VMs used of 5x, and for dev and test usage the reduction in VMs averages close to 10x.

How does WinDocks compare to Microsoft’s container support on Windows Server 2016?

1) Microsoft’s supports Windows Server 2016 and Windows 10 Enterprise editions only, while WinDocks supports all editions of Windows 8 and Windows Server 2012 onward.

2) Microsoft has two SQL Server Express dockerfiles on Dockerhub, but provides no build time support for attaching SQL Server databases! WinDocks supports all editions of SQL Server 2008 onward, with dockerfile support for adding or mounting databases and running SQL Server scripts. SQL Server containers built using WinDocks are complete and ready for use.

We don’t argue when some observe that Microsoft’s design serves to maximizes SQL Server instances and license revenues.

WinDocks Support for Java and Tomcat ,

WinDocks ships with a \Samples folder that includes dockerfiles for Ngnix, Node.js, Tomcat, Jetty, and of course .NET and SQL Server. The Tomcat test folder is shown below, along with a sample Dockerfile. The Dockerfile uses the new “Windows” image, along with Tomcat version 7.0.72, and a PowerShell script that sets the Tomcat server port to the container port.

Java Image 1 650 x 260

If you have a WAR file, it could be added with an additional COPY command, or it could be pulled from the appropriate repo. The command to build the container is >docker build . The “testjavatomcat” folder is included in the WinDocks samples directory. Each container includes a unique ContainerID, and an assigned port (underlined below). We then start the container using the >docker start .

Java Image 2 650 x 320

Opening a browser to localhost: (we’re working on the WinDocks host), we can see our container is built and running. Windows Task Manager also confirms that we have Java.exe running in a container.

Java Image 3 650 x 270

Create a Tomcat Image

Now that we’ve created a running container, we can commit this as an image, with >docker commit . Once saved we can create as many identical, isolated containers as needed. Saved and tested images become artifacts in a Continuous Integration process. We’ll write again soon about the new WinDocks Jenkins Build Plugin.

Each Tomcat container is built with a dockerfile that includes a script to ensure the Tomcat port is matched to the container port. Again, the container has a ContainerID, and port, and we can start it as shown.

Java Image 4 650 x 220

And, the result is easily confirmed with a refreshed browser pointing to the new container port.

Java Image 5 650 x 175

Do More, Faster, and Spend Less!

If you haven’t explored the use of containers, now is the time! WinDocks customers use a single VM to support a team of developers or testers, saving time and money. One WinDocks customer uses a bare metal host with 8 cores and 96 GB of RAM, to support twenty SQL Server containers for dev and test. Each container includes over twenty large databases! Prior to using containers, each VM took over an hour to provision. Using WinDocks the time is down to a couple of minutes. The result is a 20x reduction in VMs, a 5:1 reduction in CPU cores, and a dramatic financial savings in MS license costs.

Explore the Use of Windows Containers!

Join thousands worldwide who have downloaded the WinDocks Community Edition, and explore the new world of containers with your own copy at Download WinDocks Community Edition.

     RSS Feed