Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Load Balancing A Docker Swarm Cluster With An NGINX Reverse Proxy

If you’ve been working towards containerizing your web applications like I have, you might be at a point where you’re ready to start clustering your containers. Previously I had written about creating a container cluster with Docker Swarm and using NGINX as a reverse proxy for a few containers. The catch here is that neither of these previous tutorials were meant to work together. In the previous example we were using a reverse proxy for containers on a single server. While Docker Swarm offers it’s own load balancing, you’ll find it makes sense to have NGINX as well because not every container can run on the host as port 80.

We’re going to see how to create two service containers that are replicated across several nodes. These services will be a simple Apache and NGINX web applications. Then we’re going to throw an NGINX reverse proxy into the mix that keeps track of the upstream nodes for its own load balancing.

Read More

Using The Docker Client With A Remote Machine Or Virtual Private Server

Not too long ago I wrote about containerizing a bunch of web applications and putting them behind an NGINX reverse proxy. This is because I’ve been exploring the possibility of taking all my personal applications and turning them into Docker containers for easy maintenance and portability. I currently use Digital Ocean and if I had to guess, I’m going to be using it for a lot longer as it is a great service. So what does it take to get containerized applications on Digital Ocean or any other remote machine?

We’re going to take a look at creating and defining a remote machine in Docker and deploying containers on it.

Read More

Using Couchbase With Docker And Deploying A Containerized NoSQL Cluster

You can do a lot of cool things with Docker, for example containerizing web applications, processes, and a bunch of other things. What happens when you want to deploy your database as a container, or more specifically, your distributed database as containers? Most NoSQL databases are distributed, meaning they can be easily clustered with data replication and a bunch of other awesome features. How do you provision each node or configure the cluster?

We’re going to see how to create a custom Docker image for the popular document-oriented NoSQL database, Couchbase, and cluster a few containers together to make one awesome NoSQL cluster.

Read More

Define Docker Container Networking So Containers Can Communicate

So I was recently playing with Docker using a mixture of docker-compose and the docker commands and I found myself with a container communication issue. I was trying to spin up a container to communicate with containers launched via docker-compose, but my new container couldn’t find these other containers. This is because there was a networking issue between how the Compose containers were running, versus vanilla.

So what do you need to do when it comes to networking and communication between containers?

Read More

Continuous Deployment Of Web Application Containers With Jenkins And Docker

Continuous deployment (CD) is a very interesting subject. Being able to establish a build pipeline that deploys your application once building is complete is a fantastic form of automation. Jenkins is one of the most popular, if not the most popular, continuous integration (CI) and continuous deployment tool available. Traditionally one would create a workflow in Jenkins that pulls from Git, builds, and deploys the packaged application to another server via SSH. However, this process could become even more efficient using Docker and containers.

We’re going to see how to use Jenkins to build a Docker image and deploy the image as a container, replacing any previously existing containers in the process.

Read More

Create A Cluster Of Microservice Containers With Docker Swarm

I’ve been on and off when it comes to Docker, but lately I’ve been starting to embrace it. In comparison to virtual machines, containers a lot easier to maintain and are more lightweight. While working with containers are great, their true power aren’t made visible until you start clustering them. There are a few clustering and orchestration options, the most popular being Kubernetes and Docker Swarm.

In this guide we’re going to see how to create a simple Docker Swarm cluster on several server nodes that consist of both manager nodes and worker nodes.

Read More

Build A Custom Docker Image For Your Containerized Web Application

I’ve been working with Docker for a while now and I’ve found that I’m rarely using one of the vanilla images found on Docker Hub. By rarely, I don’t mean never, but in most cases I find that I’m building my own custom Docker image for any web application that I wish to containerize. This allows me to create an image that meets my needs and deploy it anywhere and anytime that I find necessary.

We’re going to see how to build a simple web application and turn it into a Docker image so it is containerized and easily deployable anywhere that Docker Engine is available.

Read More