Docker Containers: Common Issues

Docker Containers: Common Issues

Issue: I am trying to build a development SQL Server that I can continue to learn SQL on and use Microsoft SQL Server Management Studio (SSMS) to access on a Windows PC.

However I wish to use SSMS on my Windows PC and am unsure how I begin to connect to the remote box. In the picture below, there are no options to specify an SSH key or to even login in to the Ubuntu box, only to access the SQL server.

Solution: Connect via SSMS using the public IP address, followed by comma separator and then the port (xxx.xx.xx.xxx,port).
You’ll also need the sa credentials to make this work.

Issue: When I attempt to connect to my container, it fails. Likewise, when I use the command to view my images, the container does not show up in the list.

Solution: Navigate to the Docker Desktop in the System Tray, select Restart…
You should be able to connect now.

BONUS: SSMS Issue

Issue: The SSMS the splash screen will come up, but then the process exits.

Solution: As Ronan Ariely recommendsan official solution has been published which recommends removing a line from ssms.exe.config.

In C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe.config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <!-- ...snip... -->
    <runtime>
        <!-- ...snip... -->
        <!-- Remove this line (~line 38) -->
        <NgenBind_OptimizeNonGac enabled="1" />
        <!-- ...snip... -->
    </runtime>
    <!-- ...snip... -->
</configuration>

VMware Workstation Device/Credential Guard are not compatible

When using VMware Workstation 14 Player on Windows 10 I got the following error when trying to start any VM:

VMware Workstation and Device/Credential Guard are not compatible. VMware Workstation can be run after disabling Device/Credential Guard. Please visit http://www.vmware.com/go/turnoff_CG_DG for more details.

To disable Hyper-V from starting the following command can be used in an Administrator PowerShell Terminal:

bcdedit /set hypervisorlaunchtype off

A reboot of Windows 10 is necessary. After the reboot I was able to boot the Windows 10 VM.

To enable the Hyper-V role again use the following command in an Administrator PowerShell Terminal:

bcdedit /set hypervisorlaunchtype auto

A reboot of of the Windows 10 is necessary.

VMware/Microsoft has a KB article how to disable Windows Defender Credential Guard, link and link.

Solution found thanks to Ivo Beerens.

Connected Docker Desktop Issue

I suspect the issue is due to having Docker installed/in process along with the VMware Workstation 14 Player because as soon as I disable Hyper-V (enabling VMware Workstation Vms) from starting, the Docker Desktop stops working. If I attempt to manually start it, I receive the following error:

Yet Docker works after a Windows reboot, if I enable the Hyper-V role again use the following command in an Administrator PowerShell Terminal:

bcdedit /set hypervisorlaunchtype auto

Docker Documents has the following information about this issue:

If, at some point, if you manually uninstall Hyper-V or disable virtualization, Docker Desktop for Windows cannot start. See: Unable to run Docker for Windows on Windows 10 Enterprise.

https://docs.docker.com/docker-for-windows/troubleshoot/#virtualization-must-be-enabled

In order for Docker Desktop for Windows to function properly your machine needs:

  1. Hyper-V installed and working
  2. Virtualization enabled

Leave a Reply