Map Windows host location to Linux container in Docker

I’ve been working more with Docker on a Windows PC lately. With the more recent versions of Docker, the application runs much better and there is task bar control panel for managing the processes. If you are interested in trying out Docker and don’t have a Linux machine to work with, go download the Windows Stable Community edition which was recently updated to 17.09.0.

Continue reading

NAT:HNS error with Docker SQL Server container on Windows10

As with many things I post here, this article was the result of a problem I encountered, and how to resolve or work around it. I have been working with Docker on Windows and was attempting to run a container provided by Microsoft that included SQL Server. The process is fairly easy, just pull the image and run it with the appropriate command options. Unfortunately, that didn’t work. When I used the supplied command to run the container, I would get this error message:

Error response from daemon: failed to create endpoint <container name> on network nat: HNS failed with error. Unspecified error.

I spent several hours working this out over the past few days, doing web searches and trying various ideas. Lots of people experiencing the problem, but no solutions. Eventually I figured out a solution. Hopefully this helps someone else. The error above I found out indicates a problem with the default ‘nat’ network that Docker creates when you install it.  By using the default NAT network, you basically have a private network on your docker host.

You can attempt to delete that network by opening PowerShell as Administrator. (Microsoft has a good write-up on networking for Windows containers here.) Enter the following command to see a list of the virtual networks defined on your PC:

Get-NetNat

Stop Docker using the whale icon on your notification area, by right clicking on the whale and choosing Quit Docker from the menu. Then run this command:

Remove-NetNat

Enter “Y” at the prompt to remove all networks. Now restart Docker.  If this doesn’t work for you, read on.

Continue reading

Running Kettle (Pentaho Data Integration) on Mac OSX 10.12 Sierra

A new version of Mac OSX and a new version of Pentaho Data Integration (aka Kettle) but the same old problem getting Kettle to run. Apple tries to keep their operating system locked down and secure, so if you download applications from the Internet that aren’t from the Apple App Store, the files are quarantined.

With the update to Sierra, the quarantine process has been “improved”. Keep reading to see how to do it!

Continue reading

Use Linux SQL Server with R (ODBC)

This is my second article on using Microsoft’s new Linux version of SQL Server with R. This time, I’ll cover how to use RODBC to gather data from SQL Server. As a bit of background, over the past few months, I have been working to learn R, a free software environment for statistical computing. Its been gaining popularity over the past few years, and Microsoft just gave it a huge boost by integrating R into their Power BI visualization software and in the Windows version of SQL Server 2016. Since a good deal of my work involves connecting to Microsoft SQL Servers  its a good opportunity to show how to connect to a SQL Server installed on Ubuntu from R using ODBC.

For this tutorial, I am going to assume that you already have R installed. For my purposes,  I am running R on the same Ubuntu machine as the SQL Server. If you need instructions for installing SQL Server on Linux, Microsoft has provided a write-up already. So now let’s get started.

Continue reading