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

  • And what is the question? – Maximus Jan 18 '16 at 9:38
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.

  • so in my case, I needed to add C:\Program Files\Docker Toolbox to my path, too. – Yar Jan 20 '16 at 5: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 1 '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"
  • 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 2: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 i.cubeupload.com/Hi7ETK.png – Artisan May 31 '16 at 17:05
  • It looks similar to this issue: 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 8: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 0: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

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"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.