Categories
docker nerdy stuff

The Bleeding Part of the Edge

Over at WePay, we’ve been hard at work over the past couple of months on working on some new internal initiatives. On the engineering team, one of the initiatives that we’ve put forward is to completely embrace microservices using Docker and I’ve had the privilege of being one of the engineers to lead the charge and help figure out how this will all fall into place within our existing structure.   Docker took me a bit to understand and wrap my head around but after wrestling with it for so long, I’ve grown to love it and now I don’t remember how the world worked before it came into existence. There was a lot of stumbling and guessing along the way but that was fine as long as I was okay with failing fast and recovering even faster. I would like to preach about all of the wonders of Docker but funny enough when I tried to do so recently, I ran into a wall with a bug that took forever to figure out.

Tl;dr, Docker requires another piece of software called boot2docker to run on a Mac. Docker requires some Linux packages to run and the way boot2docker gets around it is that it runs a tiny Linux VM using VirtualBox and your Docker commands are issued to that VM instead of your Mac when you set it up right. Recently, I tried to get my coworker set up with Docker so I can talk his ear off about how wonderful it is and he told me that he was running into an issue with running any of the Docker commands.

An error occurred trying to connect: <em>...</em>: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103

What? rip dockerWhen I got Docker installed on my setup, I took down notes on how I got it up and running. I sat there with him and we both re-ran through the installation process multiple times using both my notes and what’s on the official documentation. After a couple of tries, I went on Google and started searching away. Eventually, I found a thread on the official GitHub repo and saw someone who was having a similar issue as us. At the time, the thread didn’t figure out what the issue was yet and the ticket was still open. It did appear that the issue was isolated to the then-new 1.7 release.

It hasn’t been a long time since I started using Docker and I didn’t realize that I was already 2 major versions behind. The simple fix for us was to use a previous release of boot2docker and that allowed me to get my coworker up and running. I laughed to myself for a bit after the experience; it felt like the universe was reminding me that I’m not the only one that’s rapidly trying to release something and breaking stuff along the way.