Docker: Looks something went wrong in step Looking for vboxmanage.exe - docker

I just installed Docker Toolbox on my windows 7 machine.
After installing I run the Docker Quickstart terminal which displays the following message:
Looks something went wrong in step nLooking for vboxmanage.exen... Press any key to continue....
Anyone here who knows how to solve this?
Regards,

The same thing happened to me. At this moment I am using Windows Home.
At least in my case, what happened was that the environment variables DOCKER_MACHINE and DOCKER_TOOLBOX_INSTALL_PATH were not created for the system.
I just had to add them and it worked.

Solved the problem by cleaning my .bashrc file.
More specific, i removed the cd , which makes perfectly sense.

For me, the problem was that the DOCKER_TOOLBOX_INSTALLPATH was only set for the user used to escalate priviligies at installation. When I run Docker Quickstart as my regular user, the DOCKER_TOOLBOX_INSTALLPATH variable is empty, producing the error.
Setting DOCKER_TOOLBOX_INSTALLPATH system wide solved the problem.

I'm Windows 8.1 user, I got the same problem when I installing the Docker Toolbox.
Because I have a previous version of VirtualBox installed, so I uncheck the VirtualBox install option in the Docker Toolbox installer.
After the install and I run Docker Quickstart terminal and get the same problem looks like something went wrong in step 'looking for vboxmanage.exe'.
Look at the file D:\Docker Toolbox\start.sh, there are some code fragment:
STEP="Looking for vboxmanage.exe"
if [ ! -z "$VBOX_MSI_INSTALL_PATH" ]; then
VBOXMANAGE="${VBOX_MSI_INSTALL_PATH}VBoxManage.exe"
else
VBOXMANAGE="${VBOX_INSTALL_PATH}VBoxManage.exe"
fi
The start.sh use $VBOX_MSI_INSTALL_PATH and ${VBOX_INSTALL_PATH} Environment Variables to locate the VBoxManage.exe.
And I find my system variables VBOX_MSI_INSTALL_PATH is
D:\VirtualBox
and then, I change it to
D:\VirtualBox\
It works fine!
Or maybe you miss the VBOX_MSI_INSTALL_PATH/VBOX_INSTALL_PATH Environment Variables.
This is my first answer on stackoverflow, I hope this will help you! Finally forgive my poor english ):

For me, it helped to start Docker Quickstart Terminal with admin privileges.

This works if you do not have admin rights:
> Setx DOCKER_MACHINE "C:\Program Files\Docker Toolbox\docker-machine.exe"
> Setx DOCKER_TOOLBOX_INSTALL_PATH "C:\Program Files\Docker Toolbox\\"
> Setx VBOX_MSI_INSTALL_PATH "C:\Program Files\Oracle\VirtualBox\\"
The double backslash in the end makes sure that the variable is saved with one backslash as last character, needed in C:\Program Files\Docker Toolbox\start.sh:
> echo %DOCKER_TOOLBOX_INSTALL_PATH%
C:\Program Files\Docker Toolbox\

Running docker as Administrator solved the problem for me.

I had the same issue.
Inside your toolbox installation folder you should be able to find the installers folder, there you'll find a setup.exe for a Oracle Virtual Box. Double click it, install it and you should be able to reopen the Docker Quickstart with no problems.
Hope this helps!
Cheers! :D

Simple solution: I thought I could just double click on it, but instead need to bring up a windows command prompt, CD to C:\Program Files\Docker Toolbox , and type
sh start.sh

Due to the relative DOCKER_MACHINE path definition on L10, it seems that start.sh will only run when you are inside its directory. I fixed it by modifying the target of the "Docker Quickstart Terminal" shortcut as follows:
C:\Tools\Git\git-bash.exe -c "cd /c/tools/docker; ./start.sh"
Substitute the paths to GitBash and Docker Toolbox to match your installations. If your paths contain spaces, be sure to wrap them in quotes as usual. For example:
"C:\Tools\Git Bash\git-bash.exe" -c "cd '/c/tools/docker toolbox'; ./start.sh"
For context, I had GitBash and VirtualBox already installed before installing Docker Toolbox, so I deselected those options during its install. I'm sure that if I went with the default options, this issue wouldn't have happened. That's probably why some folks on GitHub suggest uninstalling VirtualBox and re-installing Docker Toolbox. Don't do that, it's almost certainly unnecessary.

Do you know how good an open-source program is?
You can actually investigate the issue yourselve, which could be way more precise.
please scroll the quickstart terminal up and see which error message you have got
open C:\Program Files\Docker Toolbox\start.sh (Where you install docker toolbox) with text editer, e.g. sublime text
and see the codes
if it is in step "looking for vboxmange.exe", it should be before STEP="Checking if machine $VM exists" and there are only 50 lines to read
As of 2018-11-27, the only two error that could be given in this step is from these lines, so investigate and find your error in it:
which are:
if [ ! -f "${DOCKER_MACHINE}" ]; then
echo "Docker Machine is not installed. Please re-run the Toolbox Installer and try again."
exit 1
fi
if [ ! -f "${VBOXMANAGE}" ]; then
echo "VirtualBox is not installed. Please re-run the Toolbox Installer and try again."
exit 1
fi
In which:
DOCKER_MACHINE="${DOCKER_TOOLBOX_INSTALL_PATH}\docker-machine.exe"
And
if [ ! -z "$VBOX_MSI_INSTALL_PATH" ]; then
VBOXMANAGE="${VBOX_MSI_INSTALL_PATH}VBoxManage.exe"
else
VBOXMANAGE="${VBOX_INSTALL_PATH}VBoxManage.exe"
fi
So, check your environmental variables and echo it.
In my case, the reason is that DOCKER_TOOLBOX_INSTALL_PATH is an admin user variable:
So, run the quickstart terminal as admin user or put the variable under System variable would do the work

I personally solved this issue by adding the following property to my env (Windows Env variables):
DOCKER_TOOLBOX_INSTALL_PATH=C:\Program Files\Docker Toolbox\
as pointed out by the start.sh script of the Docker Toolbox installation.

You can solve this reinstalling the VirtualBox, choosing repair mode.
C:\Program Files\Docker Toolbox\installers\virtualbox -> virtualbox.exe
enter image description here
After finished the process, restart you machine and smile!

For Windows 7 users:
Change value "C:\Program Files\Oracle\VirtualBox\" to "C:\Progra~1\Oracle\VirtualBox\" for VBOX_MSI_INSTALL_PATH system variable in environment variables.

If you are running docker from admin cmd then just try to scroll up and you will get the error message, and then you can solve the issue.
For me the the error "Docker Machine is not installed. Please re-run the Toolbox Installer and try again."
But unfortunately reinstall did not solve the issue.

I also had this problem on Win 10 Home and I tried probably every solution from this topic but nothing works, only thing that worked for me was hardcoding Path to VBOX in start.sh.
So in start.sh in this part:
STEP="Looking for vboxmanage.exe"
if [ ! -z "$VBOX_MSI_INSTALL_PATH" ]; then
VBOXMANAGE="${VBOX_MSI_INSTALL_PATH}VBoxManage.exe"
else
VBOXMANAGE="${VBOX_INSTALL_PATH}VBoxManage.exe"
fi
I did this:
STEP="Looking for vboxmanage.exe"
if [ ! -z "$VBOX_MSI_INSTALL_PATH" ]; then
VBOXMANAGE="C:\Program Files\Oracle\VirtualBox\VBoxManage.exe"
else
VBOXMANAGE="${VBOX_INSTALL_PATH}VBoxManage.exe"
fi
And this works very well.
I know that this solution(hardcoding path) isn't best possible but it's only one which worked for me, and I think that sometimes it's better to use bad solution which works than good one which didn't work

This happens when the user connects to some sort of secured networks using VPN, TLS machine certs gets messed up, upon restarting machine and regenerating TLS machine certs, docker toolbox is configured to use the default machine with IP 192.168.XX.XX

In windows 8.1, I solved the problem by just adding extra \ to the DOCKER_TOOLBOX_INSTALL_PATH environment variable.
Installer has created the user variable for admin as DOCKER_TOOLBOX_INSTALL_PATH=C:\Program Files\Docker Toolbox
, but it should be
DOCKER_TOOLBOX_INSTALL_PATH=C:\Program Files\Docker Toolbox\

For people that installed docker with chocolatey you need to install VirtualBox separately from docker with choco install virtualbox and set environment variables as this
DOCKER_MACHINE == "C:\Program Files\Docker Toolbox\docker-machine.exe"
DOCKER_TOOLBOX_INSTALL_PATH == "C:\Program Files\Docker Toolbox\"
VBOX_MSI_INSTALL_PATH == "C:\Program Files\Oracle\VirtualBox\"
don't forget to add \ at the end of the folders

I faced same issue on my Windows 7 machine and below steps has resolved the same
Went to C:\Program Files\Docker Toolbox\installers\virtualbox and doubleclick virtualbox.msi to install Oracle Virtual box. (Note : It will install andd ask permission for 3-4 more components, Grant them all)
Set up the Env Variables
DOCKER_MACHINE C:\Program Files\Docker Toolbox\docker-machine.exe
DOCKER_TOOLBOX_INSTALL_PATH C:\Program Files\Docker Toolbox
Restart the machine
Finally Open Docker Quickstart Terminal and give it some minutes (probably 5-10) to let it do the setup

I am having the same issue with the vboxmanage.exe upon running my docker toolbox.
I managed to solve the problem by installing virtualbox since I did not install virtualbox on my computer.
Might as well give it a try.

Docker Tool Box is not a standalone application. It has many other tools like Oracle Virtual Box, Git & docker engine itself.
./start.sh is seeking some existing configuration which might miss in the older version. I updated the GIT version from 2.0.x to 2.12.x & it works for me.

Related

How to remove a snap application (docker) completely

I made the mistake of installing Docker via Snap... Once I realised that snap hadn't permissions to run in my working directory (on a different partition), I removed it. Now I can't use docker after I've installed it via apt-get.
Please help.
I've done sudo snap remove docker but when I sudo apt install docker and run via docker, I get bash: /snap/bin/docker: No such file or directory
The command you are looking for is:
sudo apt install docker.io
i.e it's docker.io not just docker
On Ubuntu, the package docker is described as a "System tray for KDE3/GNOME2 applications", which is probably not what you want!
I had the same problem. This works for me.
sudo snap remove docker
sudo reboot
the point is to restart the instance or terminal.
I hope this method can help
I did the same and just restarting the instance fixed it.
The problem is simply that your bash shell caches the locations of known executables, in order to avoid having to scan through your executables search path (that is, the directories listed in $PATH) every time you type a command. Because you have removed the executable from one directory (/snap/bin) and added it to another directory (/usr/bin), this cache is now out of date. This means that it will look in the wrong location if you try to invoke the executable simply by typing docker rather than its full path.
It is possible to fix it simply by starting a new bash shell, for example open a new terminal window and type the command in there.
Alternatively if you wish to refresh the cache in the terminal session that you are already using, type:
hash -r
It is not necessary to restart your computer (although this would also work).

"code ." command stopped working from Ubuntu bash shell for Windows 10

I have WSL on Windows 10, and I used to be able to open a folder in VS Code from the Ubuntu bash shell using the command "code ." but this stopped working.
I double checked that "C:\Users\username\AppData\Local\Programs\Microsoft VS Code\bin" was added to my PATH, but it is still not working. Also, the VS Code command palette does not give me the option to install Shell Commands like I saw in other answers for people who were having the same problem with Mac OSX.
I really like the feature of being able to open a folder from command line -- is there a fix to this, or perhaps even a workaround?

Docker Toolbox Error: Looks like something went wrong in step 'Setting env'

I had Docker Toolbox installed on my Windows 7 PC and I wanted to upgrade my Docker installation to the most recent version. To do that, I decided to delete Docker Toolbox from my system and reinstall it. I uninstalled Docker Toolbox, uninstalled VirtualBox, and removed all instances of both in my files (such as files in AppData). After reinstalling Docker Toolbox and launching the Quickstart Terminal, I ran into the following error:
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this vi
rtual machine, run: C:\Program Files\Docker Toolbox\docker-machine.exe env defau
lt
Looks like something went wrong in step 'Setting env'... Press any key to contin
ue...
So it seems like it failed when "setting env". I'm not sure what that means in this context and I wish there was a way to check some extended logs to get more detail. I tried following the Docker documentation pointing the location of daemon logs in AppData, however, I could not find anything relevant. Something I did find was a file called "no-error-report", though it was empty.
I tried uninstalling everything again and reinstalling with the attribute NDIS5 network type checked, I've ran the Quickstart Terminal as admin, and I still ran into the same exact error.
Any suggestions on how I may approach this issue?
I got this same issue.
I fixed this by doing the below procedures.
I changed the below lines in start.sh
STEP="Setting env"
eval "$("${DOCKER_MACHINE}" env --shell=bash --no-proxy "${VM}" | sed -e "s/export/SETX/g" | sed -e "s/=/ /g")" &> /dev/null #for persistent Environment Variables, available in next sessions
eval "$("${DOCKER_MACHINE}" env --shell=bash --no-proxy "${VM}")" #for transient Environment Variables, available in current session
Changed --no-proxy to --http_proxy since I am using http proxy

Windows doesn't recognize Docker command

I already installed Docker for windows. when I type docker --version command in Command prompt, it doesn't recognize it at all.
The message will be this:
'docker' is not recognized as an internal or external command,
operable program or batch file.
Did I miss something ?
I had installed Docker 18.06.1-ce version on my Windows 10 machine and faced the similar issue, even though the docker was added the Windows %PATH%.
I moved the docker path to the bottom and that solved my problem.
I restarted the system, it worked, maybe we can say that a restart is required.
You need to start the docker first if you have not and then open powershell.
In the powershell, try to run docker commands.
I installed docker Docker version 19.03.13 build 4484c46d9d, in Windows 10 pro 1903.
I was facing the same issue, then I just renamed 'com.docker.cli' to 'docker' and set the environment variable to 'C:\Program Files\Docker\Docker\resources\bin'
Problem Resolved.
Refer the image:
https://drive.google.com/file/d/1sZwx4udOzJeITV2RDGQKlsOt_TF4Wq2N/view?usp=sharing
https://drive.google.com/file/d/1DpW2DR2n_jCGezwrXuhNtXpSTBWmEDJk/view?usp=sharing
Renaming 'com.docker.cli' to 'docker' helped me finally get windows powershell and cmd terminals to recognize the docker command.
Add docker to PATH variable & refreshenv to keep using the same command prompt
If you've installed using docker toolbox the install path "C:\Program Files\Docker Toolbox"
Manually using Environmental Variable > Path (add docker path here)
Using Command Line
For temporary use set PATH=%PATH%;C:\Program Files\Docker Toolbox
Make sure to take a back up of PATH by echo %PATH% before doing this
For permanent change setx PATH=%PATH%;C:\Program Files\Docker Toolbox
docker: command not found
Windows 7: Just set the path of docker in system variable
Step:1
[Click on path -> edit-> paste the docker location]
Step:2 [Paste the docker location]
In my case C:\Program Files\Docker Toolbox.
now check $ docker version
Make sure the docker.exe path (C:\Program Files\Docker\Docker\resources\bin) is added to the PATH variable.
You can check it as follows:
ECHO %PATH%
The docker path had to be appended at the end of the PATH in my case. After that docker cmd was recognized.
Run as administrator worked for me, both powershell and bash on windows. I did not need to restart.
I checked environment variables and noticed that docker path is as the following path in which "R" in resources uppercase. I fixed the case and everything worked as expected
Path: "C:\Program Files\Docker\Docker\Resources\bin"
Just Restart the system, it is always good practice to restart the system when you install or uninstall any application. Hope this works :)
For those who are facing docker issue on VS Code
I was trying on VS Code Terminal after installation. Restarted and was still facing issue.
Then I tried with fresh terminal of Command Prompt -- it worked!
After that it also working fine on vs code.
In VS Code - close all terminals and open fresh terminal
and try test command:
docker --version
2022 - Windows 11
Add these paths to the PATH variable.
C:\Program Files\Docker\Docker\resources\bin
C:\ProgramData\DockerDesktop\version-bin
Docker PATH variable Windows 11:
You need to restart the system after installation. It worked for me.
Try to install GIT bash and then run this command on it for Windows:
base=https://github.com/docker/machine/releases/download/v0.16.0 &&
mkdir -p "$HOME/bin" &&
curl -L $base/docker-machine-Windows-x86_64.exe > "$HOME/bin/docker-machine.exe" &&
chmod +x "$HOME/bin/docker-machine.exe"
Click Here.
there is some issues with PowerShell or new version of docker due to which I was facing the same issue but then I went to this page and got way to run it.
PS: GIT bash is required.
If you have installed Docker Toolbox in your windows, go and add the environment variable.
PATH = "location of folder that contains docker-machine"
I also face a problem with the installation and running docker. I'm not sure you how did you install docker. I tried this way. I've downloaded the docker toolbox (https://github.com/docker/toolbox/releases) which comes up with docker,docker-machine. Oracle Virtual box which is pretty much enough to start docker locally.Please make sure you have git bash installed in your local. Once the toolbox installation is done click the icon generated on the desktop . Make sure this icon target to your Git bash.exe (you can verify this by right click on icon and find target). and verify docker version
For me, I had to ensure the check box Enable Hyper-V Windows Features is checked as I was installing.
I just wanted to have client installed, without the engine. So earlier, as I was installing, I unchecked that option. And after successful installation, I get the error - windows does not recognize docker.
But now that reinstalled with the checkbox checked, things are working fine now.
I noticed that running docker commands before startup causes this issue, but ensuring that docker is running and executing the commands after, they are then recognised.
I facing the same issue when I try to run docker -v in Vscode Terminal after install it. I try to use cmd and git bash it work fine. Restart your vscode will solve it
Unfortunately, After many tries and restarts, I uninstalled docker and Re-installed it again, and I had to build all things again.
I faced the same problem, them I tried in Powershell which works someHo
Download "docker-machine-Windows-x86_64.exe" from: https://github.com/docker/machine/releases
Rename "docker-machine-Windows-x86_64.exe" to "docker-machine.exe".
Copy "docker-machine.exe" to path C:\Program Files\Docker\Docker\resources\bin.
just add this path in your "Path" inside env variables inside windows
C:\Program Files\Docker\Docker\resources\bin
then restart your gitbash or cmd or ...
everything goes well after that !
*just add in your environmental Path this syntax if you did like (install docker in c drive) me, most probably it would work, for me, this passed well.
(note: if you going to call RefreshEnv.cmd or RefreshEnv
through your CMC with Chocolatey, this path would not be created for you, and you have to do it manualy in Windows 10 operating system).
C:\Program Files\Docker\Docker\resources\bin
In my case, I switched to the windows command prompt instead of the VScode terminal.

Getting Rsync 3.0.9 to work on Vagrant VM box through Cygwin on windows 7

My vagrant VM box is super slow when I try to run my Rails app on it, and I'm guessing it's due to the shared folder problem.
I am trying to use rsync to circumvent the problem.
I installed Cygwin and necessary packages, put C:\cygwin64\bin; as PATH environment variable
and then changed my Vagrantfile to
config.vm.synced_folder ".", "/vagrant", type: "rsync"
When I run vagrant up, I Get this error message
$ vagrant up Bringing machine 'default' up with 'virtualbox'
provider... "rsync" could not be found on your PATH. Make sure that
rsync is properly installed on your system and available on the PATH.
What's going wrong here?
Thank you so much ... if there's any other way to run Vagrant VM box smoothly and faster on Windows 7, I would love to hear it too.
This turned out to be a bunch of brick-walls you have to circumvent when installing Rsync and setting it up correctly for Vagrant on Windows 7.
First of all, the error "rsync" could not be found on your PATH. Make sure that rsync is properly installed on your system and available on the PATH. was due to the fact that
1) Environment variable for Cygwin was placed in the latest order in the PATH, I changed it to the beginning of the path
2) During installation of Cygwin and Rsync, I installed individual "subpackages" instead of installing everything, thinking that it would be okay. Turns out I was wrong. I installed everything in the Admin package and Net package (not the SRC but just the bins), and then it started working. I suggest you set-up Cygwin again and really try to download everything if you see that error.
(I found these solutions through this post on SO cygwin + rsync)
Now, I could go into CMD and type rsync, and it would show up correctly. But then when I ran vagrant up it gave me another error saying
There was an error when attempting to rsync a synced folder. Please inspect the error message below for more info.
Host path: /c/Users/xxxxx Guest path: /vagrant
Command: rsync --verbose --archive --delete -z --copy-links
--chmod=ugo=rwX --no-perms --no-owner --no-group --rsync-path sudo rsync -e ssh -p 2222 -o StrictHostKeyCh
/c/Users/xxxx / vagrant#127.0.0.1:/vagrant
Error: cygwin warning: MS-DOS style path detected:
C:/Users/xxxxxxx Preferred POSIX
equivalent is:
/cygdrive/c/Users/xxxx CYGWIN
environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of
known hosts. rsync: change_dir "/c/Users/xxxxxxx"
failed: No such file or directory (2) rsync error: some files/attrs
were not transferred (see previous errors) (code 23) at
/usr/src/ports/rsync/rsync-3.0.9-1/src/rsync-3.0.9/main.c(1052)
[sender=3.0.9]
I googled solution to this error and found this site. https://github.com/mitchellh/vagrant/issues/3230
Then there's a bug with Vagrant and cwrsync that I mentioned in #3086.
For now, just edit
C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.5.1\plugins\synced_folders\rsync\helper.rb
and add hostpath = "/cygdrive" + hostpath to line 74. It's a terrible
solution but quick and simple.
Editing that helper.rb file and adding hostpath at line 74 (just made some blank lines right there and pasted it in) and now it works perfectly!!!!
Rsync makes the shared folder soooooo much faster on Rails!!!! I think it is worth the pain of setting it up correctly. Try it!!
It's not clear from your message, but I think you installed rsync on your machine (the host), while it needs to be installed on the virtual machine you bringing up (the guest).

Resources