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

Mapping Volumes Or Passing Environment Variables To Containerized Docker Applications

If you’ve ever worked with Docker containers you’ve probably been exposed to them being stateless, meaning when a container is destroyed, all record of it is lost including any files it might have created. Not great if you’re working with say a database, correct? However, let’s look at this from a different angle. Let’s say you are deploying a web application that requires some configuration. Depending on how you’ve developed it, the configuration could be controlled via a file or via environment variables. How do you accommodate this with Docker container deployments when you don’t want these configurations baked into the image?

We’re going to see how to work with volume mapping between container and host machines as well as passing environment variables at container deployment with Docker.

Read More

Containerization with Docker by Example Released

I am pleased to announce that Containerization with Docker by Example, a course I’ve been working on for a while, has been published to the popular Udemy education network.

This course, is the fifth course that I’ve released and the first that hasn’t been on the topic of mobile application development.

Read More

Containerizing A Node.js With Express Image Processing RESTful API Using Docker

Docker is a great way to package and deploy web applications. Applications that have been containerized can easily be created, destroyed, or even moved between servers, as long as the servers are using the Docker runtime.

Not too long ago I wrote about creating a RESTful API that could process images and generate Android compliant launcher icons. This article was titled, Create an Android Launcher Icon Generator RESTful API with Node.js, and Jimp and it was powered by Express Framework. The application could be served on any properly configured server with Node.js. The catch here is that server configuration is never easy or quick.

We’re going to see how to package our web application into a container using Docker.

Read More

Remove Untagged Docker Images From Your Docker Host Via The CLI

If you’re like me, when it comes to Docker, you probably build images non-stop. I must admit that when I create images, I don’t create any special tags, even though I should. Instead every build uses the latest tag because that is enough to meet my needs. Regardless of what tags you use, you may find yourself building the same thing over and over. When this happens, the previous image remains on your machine, but becomes untagged to make room for the new build.

So how do you prevent having potentially hundreds of untagged Docker images lingering on your machine? We’re going to see how to quickly remove them.

Read More

Create A Raspberry Pi Cluster With Docker Swarm And Raspbian Linux

Back when I was first learning about Docker, I had tried to use it on one of my Raspberry Pi devices. This was when Docker had first become available officially for Raspbian. When I was playing around with Docker and my Raspberry Pi, I had written a tutorial for deploying containers, or more specifically a Ghost container. This was a single container on a single device or node. Since then I started playing around with Docker Swarm and decided to create a Raspberry Pi cluster.

We’re going to see how to take several Raspberry Pi devices, cluster them using Docker Swarm, and deploying containers to Swarm with replica copies.

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