Running Docker Quickstart Terminal Inside ConEmu02 May 2016
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 184.108.40.206 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:
You should now be at the settings screen, which will look something like this:
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:
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:
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:
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:
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.