Unix

A utility to help you wait for ports to open

There are occasions where you might need to have scripts or commands which wait for TCP/IP ports to open before you continue. I've come across this need again and again when working with microservices, to make my life easier I've created a little utility called wait-port which will wait for a port to open: It's built in Node, the project is open source, open for contributions and ready to use:
Read more

Simple Continuous Integration for Docker Images

In this article I'm going to demonstrate a few tips and tricks which can make your life easier when you are building or maintaining Dockerfiles. The need for a Build Pipeline Do we really need any kind of continuous integration or build pipeline for Dockerfiles? There will be cases when the answer is no. However, if the answer to any of the following questions is ‘yes’, it might be worth considering:
Read more

Testing the Docker for Mac Beta

I've finally had a chance to install the new Docker for Mac Beta and give it a whirl. In this article I'm going to talk a bit about how Docker works, the challenges of running Docker on a Mac or Windows and how the new Beta helps. Below: The welcome message for the new Docker for Mac app So What is Docker for Mac? If you don't know what Docker is, check out my article Learn Docker by Building a Microservice or the lovely What is Docker page from the docs.
Read more

Quick Tip: Sending Newlines with cURL

Yikes, this took far too long to figure out! I have a service which takes plain text multi-line input and outputs an object for each line, something like this: Input Line 1 Line 2 Line 3 Output [ {line: "Line 1"}, {line: "Line 2"}, {line: "Line 3"} ] There's a bit more to it than that, but that's the gist. I want to test my service with cURL, trying: curl --data "Line 1\nLine 2\nLine 3" \ -H "Content-Type: text/plain" localhost:3000/parse This did not work.
Read more

Learn Docker by building a Microservice

If you are looking to get your hands dirty and learn all about Docker, then look no further! In this article I'm going to show you how Docker works, what all the fuss is about, and how Docker can help with a basic development task - building a microservice. We'll use a simple Node.js service with a MySQL backend as an example, going from code running locally to containers running a microservice and database.
Read more