9

I am trying to make docker run on ConEmu by creating a task that open up Docker start.sh file usinggit bash.

Since normally docker Terminal is pointing to "C:\Program Files\Git\bin\bash.exe" --login -i "C:\Program Files\Docker Toolbox\start.sh" ,is there any way I can make a task on ConEmu to do this? So something like this:

enter image description here

Yar
  • 266
  • 3
  • 11

5 Answers5

13

In the task parameters:

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

Commands:

"%ConEmuDrive%\Program Files (x86)\Git\bin\sh.exe" --login -i -new_console:C:"C:\Program Files\Docker Toolbox\docker-quickstart-terminal.ico" "C:\Program Files\Docker Toolbox\start.sh"

Please note that I have git in Program Files (x86), and also that the -new_console parameter that references the ico is not needed. I assume you have that ico, but you can remove the whole parameter if it proves problematic, but you will be left with the Git bash icon.

Yar
  • 266
  • 3
  • 11
Cuul Rinzler
  • 306
  • 2
  • 4
  • so in my case, I needed to add `C:\Program Files\Docker Toolbox` to my path, too. – Yar Jan 20 '16 at 05:16
  • "%ProgramFiles%\Git\bin\sh.exe" --login -i -new_console:C:"%ProgramFiles%\Docker Toolbox\docker-quickstart-terminal.ico" "%ProgramFiles%\Docker Toolbox\start.sh" – Alexandre Sep 01 '16 at 11:58
9

The posted answer didn't work for me (using Docker Toolbox 1.10.3). I chose to install Docker Bash shell during install (basically everything the installer offers).

Here's what worked for me (note the use of bash.exe):

task parameters:

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

Command:

"C:\Program Files\Git\bin\bash.exe" --login -i -new_console:C:"C:\Program Files\Docker Toolbox\docker-quickstart-terminal.ico" "C:\Program Files\Docker Toolbox\start.sh"
Mrchief
  • 452
  • 6
  • 13
  • accepted answer also didn't work for me, but this one worked. I'm using Docker Toolbox 1.11.0 – Diego Ponciano Apr 24 '16 at 02:54
  • This answer almost works for me, I can see the whale but I cannot use any `docker` command, I got **bash: docker.exe: command not found**, I don't know why, please advise. – Artisan May 31 '16 at 16:57
  • This is my screenshot http://i.cubeupload.com/Hi7ETK.png – Artisan May 31 '16 at 17:05
  • It looks similar to this issue: https://github.com/docker/docker/issues/17774. Feel free to open up another question if you need more help regrading this. – Mrchief May 31 '16 at 17:35
6

Install docker before installing conEmu that is configured automatic.

enter image description here

Task Parameters:

/dir "%DOCKER_TOOLBOX_INSTALL_PATH%" /icon "%DOCKER_TOOLBOX_INSTALL_PATH%\docker.exe"

Start console:

"%DOCKER_TOOLBOX_INSTALL_PATH%\..\Git\usr\bin\bash.exe"-l -i "%DOCKER_TOOLBOX_INSTALL_PATH%\start.sh" -new_console:t:"Docker"
  • 2
    If ConEmu is installed before installing the docker toolbox, you can click "Add default tasks..." and it will repopulate the list and include Docker. – KevB Jul 27 '16 at 08:28
  • This is what worked for me. The other solutions kept complaining about the spaces in the directory paths and not being able to run "C:\Program" – David Woods Feb 25 '18 at 00:02
1

With ConEmu 160207 (on a Windows7 Pro), after installing Docker (version 1.11.1, build 5604cbe) and then bring up a ConEmu windows, I noticed there is a task for Docker automatically added.

Here's the ConEmu setting dialog box:

enter image description here

DavidPostill
  • 153,128
  • 77
  • 353
  • 394
THO
  • 11
  • 1
1

None of these worked for me for a freshly installed Docker Toolbox.

This is what I finally got to work.

Task Parameters

/dir "%DOCKER_TOOLBOX_INSTALL_PATH%" /icon "%DOCKER_TOOLBOX_INSTALL_PATH%\docker.exe"

Commands

set CHERE_INVOKING=1 & %ConEmuDrive%\cygwin64\bin\bash.exe --login -i "%DOCKER_TOOLBOX_INSTALL_PATH%\start.sh" -new_console:t:"Docker"