Docker Errors and What To Do About Them
Some common Docker fixes:
- Docker starts, but when you type cd /docker you get an error
about the docker folder not existing. Actually, the error may
start further
back: the system gives timeout messages about connecting to the network
adaptor. Try turning off Hyper-V:
- Open the Windows Settings (start menu, click on the gear icon).
- Enter "turn windows features" in the search box and click on Turn
Windows features on or off.
- In the Windows Features window, clear the Hyper-V entry.
- Expand Hyper-V and make sure both entries under it are also cleared.
- Click OK and reboot the computer as required.
- The /docker directory is empty; that is, when you
type ls /docker there are no files listed. Type exit
to exit Linux and type docker reload.
- You get a message stating that an error occured and you need to look at
the virtual box manager.
- Open Oracle VM VirtualBox Manager
- Find the virtual box related to your Ubuntu instance. It should be
named something like [folder]_default_XXXXXX_XXXX where the
folder is the place from which you ran the docker up command and
the the Xs are numbers. Presumably the instance is not
running.
- Select the VM instance and click the Start button.
A message should pop up saying why the VM will not start. Help related to
this message may be below.
- When you try to start the VM, you get a message like "This host
supports Intel VT-x, but Intel VT-x is disabled." Some MSOE laptops
are distributed with the virtual machine support disabled. There are
two possible fixes:
- The preferred solution is to configure the VM to not require the
support. Open VirtualBox, power off the VM (right click, close, power
off), right click, select Settings, select System on the left, click on
Acceleration, then clear "Enable VT-x/AMD-V" for hardware virtualization.
Click on OK and then execute docker up.
- A less preferred solution is to re-enable it in the BIOS.
Warning: BIOS changes can
disable your computer. Be very careful in following the steps
below, double-checking each step. The followng procedure has only been
tested on MSOE laptops; the steps for other computers may differ.
- Reboot your computer.
- When you get a blank screen, press the Escape key multiple times.
- On the first menu, press F10 to get to the BIOS Setup menu.
- In the BIOS Setup menu, click on System Configuration and then
Device Configurations.
- Scroll down to "Virtual Technology" and enable it.
- Save changes and exit the BIOS configuration. This should reboot
your laptop, and you should now be able to execute docker up.
Note that some MSOE laptops have passwords that prevent you from accessing
the BIOS. For those, visit the help desk; it takes just a few minutes for
someone to enable VTx and VTd support.
- Docker repeatedly reports "ssh: trying to connect" or "Warning:
Connection timeout. Retrying..." On MSOE laptops,
this probably means that virtual machine support is disabled. See the
above steps for enabling Virtual Technology. If you think you
have virtualization enabled, you might check:
see here
for a blog on that or simply download
the Intel
Processor Identification Utility and check the CPU Technologies tab.
- Virtual Box reports something similar to "NtCreateFile failed:
Unknown Status -5657. VBoxDrvStub error: Not signed with the build
certificate." This is a bug in
VirtualBox. Ticket
16318 states that the fix is to uninstall VirtualBox, reboot your
system, and then
reinstall it.
- If you get some other error message, do the standard thing: use your
favorite web engine to search for "docker key words from error
message". Docker has a strong user community, and there's a good
chance your problem is mentioned on Stack Overflow. Let your instructor
know if you don't understand a fix that looks like it should help.