docker login issue
AnthonyWC opened this issue · 4 comments
I got this error from docker login; I actually want to uninstall babun-docker since it seems to take over my "normal" docker command, e.g.:
~/aws docker login
Warning: failed to get default registry endpoint from daemon (An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.23/info: open //./pipe/docker_engine: The system cannot find the file specified.). Using system default: https://index.docker.io/v1/
-- babun-docker: Setting VirtualBox shared folder for drive c
VBoxManage.exe: error: The machine 'default' is already locked for a session (or being unlocked)
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component MachineWrap, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 1012 of file VBoxManageMisc.cpp
-- babun-docker: Trying to start docker-machine default
Starting "default"...
Machine "default" is already running.
-- babun-docker: Volumes, creating directory for drive: c
-- babun-docker: Volumes, mounting drive: c
It seems like you had your Docker Machine VM already turned on or broken before running docker
with babun-docker for the first time.
Yes, babun-docker creates a wrapper around your docker binary to detect when you don't have your Docker Machine VM already turned on (to turn it on, setting up volumes, etc) and when you are trying to run a tty command which needs to be prepended with Winpty, etc. After that (or if no errors are detected), it runs your commands with the normal docker
binary.
To disable babun-docker, you can remove a line from your ~/.bashrc
and ~/.zshrc
that says something like source '/home/user/.babun-docker/setup.sh
.
And then restart your terminal.
If you also want to remove all the installed files, remove the directories in ~/.babun-docker
and ~/.winpty
.
Hi, thanks actually it worked; if I am not mistaken looks like it worked after I ran docker ps:
antho@stratus ~/aws docker ps
An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.23/con
tainers/json: open //./pipe/docker_engine: The system cannot find the file specified.
-- babun-docker: Setting VirtualBox shared folder for drive c
VBoxManage.exe: error: The machine 'default' is already locked for a session (or being u
nlocked)
VBoxManage.exe: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component
MachineWrap, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 1012 o
f file VBoxManageMisc.cpp
-- babun-docker: Trying to start docker-machine default
Starting "default"...
Machine "default" is already running.
-- babun-docker: Volumes, creating directory for drive: c
-- babun-docker: Volumes, mounting drive: c
mount.vboxsf: mounting failed with the error: Protocol error
mount: mounting c on /cygdrive/c/ failed: Protocol error
exit status 1
-- babun-docker: Setting up docker-machine environment
-- babun-docker: Running command again
Could not read CA certificate "C:\ca.pem": open C:%
Then I just have to fix the path of the ca.pem in my .zshrc (it uses windows path).
Also you are right I did already have a docker image running before running docker login; but I didn't expect that error when I ran docker login.
I'm glad it works now.
If you have problems, try:
- Use the Quickstart Terminal that comes with Docker Toolbox and make sure it works.
- After that, turn your VM off (with
docker-machine stop default
). - Try running
docker ps
with Babun (after installing babun-docker), it should set up and start everything.