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 MoreI 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 MoreSo you’ve been doing a lot of research around the blockchain and the various cryptocurrencies. Don’t worry, I’ve been doing a lot of the same research. There is so much in the news and on social media around this subject, it would be a good idea to educate yourself.
When it comes to cryptocurrencies, there are a lot of people trying to mine it rather than buy it. Depending on the type of currency, it could be near impossible to mine or very easy. Take Bitcoin for example. Bitcoin is one of the most difficult coins to mine, while others such as DigiByte are much easier. That’s not to say the easier coins won’t become more difficult in the future.
So how do you get started with mining?
I use a Mac. If you’re a Mac owner and you try to find a mining tool online, you’re going to struggle because most are for Windows or Linux. We’re going to see how to leverage Docker to mine via a Linux container on any platform.
Read MoreI was recently working on a Functions as a Service (FaaS) project using AWS Lambda and Node.js. However, I was running into an issue where my package dependencies found in my node_modules directory were for the wrong platform once deployed to Lambda. This is not the first time I experienced a problem like this. I knew the issue straight away because I encountered the same thing when trying to use a node_modules directory generated on Mac from a Windows computer.
When uploading a package developed with Node.js to AWS Lambda, the package.json file is not considered. Instead you are uploading a package that contains the node_modules directory and all dependencies. So how do you develop for AWS Lambda from Mac and Windows, but have it work once deployed?
We’re going to see how to use Docker to get our Node.js FaaS project dependencies designed for Amazon’s flavor of Linux.
Read MoreDocker 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 MoreIf 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 MoreBack 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