Running Docker Quickstart Terminal Inside ConEmu

In trying to streamline my workflow I wanted to be able to run the Docker Quickstart Terminal from ConEmu. I've been working in ConEmu for all of my command line activity and it's a way better experience overall. This post describes how to configure ConEmu so that you can get the Docker Quickstart Terminal to run inside of it. I'm going to assume you already installed ConEmu and the Docker Toolbox. This post is written against ConEmu 16.4.16.0 and Docker Toolbox 1.11.1. Let's walk through this process now.

We'll be creating a new task in ConEmu, so open ConEmu and press Win+Alt+T to open the Settings screen. You can also open the screen pressing the green plus sign on the top right of the screen and selecting Setup Tasks from the dropdown options: ConEmu main screen with highlighted button

You should now be at the settings screen, which will look something like this: ConEmu settings screen

Next, click on the plus button just under the list of Predefined tasks. This will add a new task at the bottom of the list, which gets defaulted to GroupXX. On my screen it's Group12: ConEmu settings screen with the add button highlighted

The final step is to configure the task we just added. In my case I am calling it Docker Toolbox but you can call it anything you want. In addition to changing the name, you'll have to add two more pieces of information.

First, we'll set the working directory by adding a task parameter. The task parameter for a default Docker installation wil be:

/dir "C:\Program Files\Docker Toolbox"

If you installed the Docker Toolbox to a different directory, change the above line accordingly.

Second, we need to add a command to the task. The command you want to add is this one:

"C:\Program Files\Git\bin\bash.exe" --login -i "C:\Program Files\Docker Toolbox\start.sh"

This command assumes you are using Git as well, so if you are using a different bash shell, you will have to change this to use a different shell. This is a screenshot of what that looks like once it has been configured. Your screen should look like this unless you've changed some of the installation paths:

ConEmu settings screen with docker config

If your installation is significantly different you can copy the command lines directly from the Docker Quickstart Terminal shortcut. This is what I did and you'll see that the lines above will match the lines on the screen below. To find the shortcut file so that you can copy the commands from it, navigate to this folder:

C:\Users\your-user-folder-name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Docker

That folder will contain the docker shortcut files. Right click on the Docker Quickstart Terminal shortcut and select properties from the context menu. You should now be at the properties screen:

docker quickstart terminal properties screen

You can now copy the value in the target field and copy it into the ConEmu command field in the ConEmu settings window for you task. Then, copy the value in the Start In field and paste it into the task parameters field in the ConEmu settings window. This last value needs to be prefaced by /dir. See my example above and compare it to the values in my properties window.

Finally, remember to click on save settings. Now you should be able to start a new Docker Toolbox tab.

Installing Docker Toolbox on Windows with Hyper-V Installed

Installing Docker on Windows is a fairly simple and straightforward process. It is very well documented here. However if you have Hyper-V installed as I do, the instructions will not work right out of the box. If you try to start the Docker Quickstart Terminal, you'll get the following error message:

Running pre-create checks...
Error with pre-create check: "Hyper-V is installed. VirtualBox won't boot a 64bits VM when Hyper-V is activated. If it's installed but deactivated, you can use --virtualbox-no-vtx-check to try anyways"
Looks like something went wrong in step ┬┤Checking if machine default exists┬┤

The issue is that when you run the terminal the very first time, the startup script attempts to create the default virtual machine in which the docker containers will run. This step of the process fails if you have Hyper-V installed, even if it is disabled. In my case, I do have it installed but I have a boot option set up to disable it when I am not using it. This post describes how to change the Docker startup script to allow you to create the default virtual machine using the startup script and still keep Hyper-V installed.

Before you start with the installation of Docker, I would suggest disabling Hyper-V. If you don't know how to do this, follow these instructions. Once you have disabled Hyper-V, the first step is to install Docker using the installer for Windows. The installation should run without any issues before you proceed with the next steps.

Once you have installed Docker, we'll modify the startup file to allow it to create the default VM. The file we want to modify is located under C:\Program Files\Docker Toolbox and is called called start.sh. To modify the file you'll have to open the file in an editor running as Administrator. If you don't open an elevated editor, you won't be able to save your changes.

It's now time to edit the file, but before you do so, you may want to save a copy of the original file. Just in case. In your editor, locate the following code snippet:

STEP="Checking if machine $VM exists"
if [ $VMEXISTSCODE -eq 1 ]; then
  "${DOCKERMACHINE}" rm -f "${VM}" &> /dev/null || :
  rm -rf ~/.docker/machine/machines/"${VM}"
  #set proxy variables if they exists
  if [ -n ${HTTPPROXY+x} ]; then
    PROXYENV="$PROXYENV --engine-env HTTPPROXY=$HTTPPROXY"
  fi
  if [ -n ${HTTPSPROXY+x} ]; then
    PROXYENV="$PROXYENV --engine-env HTTPSPROXY=$HTTPSPROXY"
  fi
  if [ -n ${NOPROXY+x} ]; then
    PROXYENV="$PROXYENV --engine-env NOPROXY=$NOPROXY"
  fi
"${DOCKERMACHINE}" create -d virtualbox $PROXYENV "${VM}" fi
The second to last line is where the vm is created:
"${DOCKERMACHINE}" create -d virtualbox $PROXYENV "${VM}"

You will need to modify that line and add the --virtualbox-no-vtx-check switch to. The end result is that the line will look like this:

"${DOCKERMACHINE}" create -d virtualbox --virtualbox-no-vtx-check $PROXYENV "${VM}"

Save your changes and now you should be able to run the quickstart terminal without any issues.

The Affordable Education Robot Kit Arrives!

My affordable education kit finally arrived! To be honest it actually arrived a couple of weeks ago but with all the holidays and a new project I'm working on, it has taken me a while to get to it. Today I opened the box and took a peek at what it looks like.

Here are some photos of the kit as it arrived and what the robot itself looks like. The pen is there so you can get idea of the actual size.

affordable education robot box This is the box as it arrived. It's a bit banged up, but the contents survived, as you'll see below.



open affordable education robot box This is the open box. The components came wrapped in a fair amount of bubble wrap. I know somebody is going to have fun with that bubble wrap...



open affordable education robot box These are the contents that were wrapped in the bubble wrap.



open affordable education robot box These are the bags that were inside that previous bag, plus the robot's PCB.

So there you have it, the affordable education robot kit, broken down. The kit didn't come with any assembly instructions, so off to the web I go, to try and figure out what's the next step. I'll write some more once I've made some progress putting together the kit.

Building an Affordable Education Robot

A while back I heard about the affordable education robot. I thought it was a very interesting approach and I wanted to build one and see if I could get my daughter interested in it. I tried to buy one but my search for it turned out nothing, so I contacted Justinjustin, who is listed as the contact on the bottom of the page about getting my hands on one. Unfortunately, back then the only way to build one was basically to build it from scratch, but Justinjustin said they were talking to manufacturers and that a kit might be available at some point. However, when I asked, all that was available were the plans and diagrams. Now this was all in line with the philosophy of the project of building an open an affordable robot for education, so it endeared me even more to the project. However, it meant that I would have to print out the PCB and assemble the robot from the very basic components. I was hoping to get around to doing this at some point this year but I think I have too many projects and so something had to give.

A few days ago, I heard back from Justin, saying they had found a manufacturer that would put together kits for the robot and that these kits are available for purchase! Yay!

I've pre-ordered mine and can't wait to get it so I can start putting it together with my daughter. They've also got a homepage for the robot, which has more information on how it all works and how to put it together.

I'll post updates here as things happen, but if you're putting one together or have already put one together or want to put one together, email me and let me know about it!

Introducing ResumeChef

I'd like to introduce you to a project I've been working on over the past year. It's called ResumeChef and it's meant to help you create customized Resumes with a few clicks. You can view the marketing site or try the application out.

Why Build ResumeChef?

There are several reasons why I went down the path of building ResumeChef.

Solving My Own Problem

I've always disliked the tediousness of customizing my Resume, but I understand it's important, and that's what ResumeChef does. It helps you customize your resume quickly and without mistakes.

Keeping My Skills Sharp

Another reason for building ResumeChef is to be able to stay up to date on what is going on in the Azure cloud and in web development in general. While work pays the bills, it sometimes doesn't let me stay current.

Just Resume Customization?

I'm hoping to turn ResumeChef into much more.

For example, I currently track which jobs I've applied to and keep a copy of the Resume I sent in for the job. These days your data stays around for a while so it's probably wise to know that you applied for a different job at that same company several years ago, and which Resume you sent in.

I would like to be able to have ResumeChef automatically suggest the best Resume for a given job and then let me tweak it. I'd also like to integrate it with some of the big ATS systems out there, so that applying for a job is easier. I've got many ideas but I'd like to hear from you if this is something that might be useful for you or not.

Are You Looking For a New Job?

Well actually, yes, I am. That's probably subject matter for a new post, but I am not sure whether it's of interest, so I'll postpone writing about it until later.

However, it is a good thing for Resume Chef, because I'm going to use my own experiences doing a job search to improve ResumeChef. Expect to see new features added soon!