Not to be confused with Docker for Windows (Docker inside a Linux Hyper-V VM on Windows 10), these are my initial opinions on Microsoft’s implementation of Docker, running on Windows 2016 Server, which was released a few weeks ago. You can also enable it, minus any settings, via the beta version of Docker for Windows on Windows 10.
The first 30 minutes of this podcast are worth a listen alone, Chris Kresser discusses how your stomach biome is linked to depression, your brain and cravings. After that they discuss the role of meat in providing nutrition to humans, and how we don’t consider ourselves animals anymore.
A weekly favourite podcast doesn’t really work on this site, as I only end up adding them every month or two. So I’m switching to a monthly format to share my discoveries in the Podcast world.
This month is (another) Sam Harris one, talking about free will. Sam’s books argues for the case that we have no free will beyond very simple choices. For example speaking - the broka region of the brain is responsible for speech but how much of your speech is words you are willfully choosing? Or another example given is decisions that the subconscious brain makes for you almost a second before the action is performed (from recent fMRI scans showing this is the case).
Dennett (a philosopher) argues against this.
Today I became a Python developer (writing a single script counts as a being a Python developer doesn’t it?!).
Probably the most basic use of a Docker image is to run it, and let it exist - like
docker run hello-world. If you want to do this on a regular schedule, you have several options but the cron one is narrowed down to running cron on the Docker host or in the container.
I wanted to run a dotnet core console app that parses Reddit posts and posts itself, inside a Docker container, every 30 minutes on set days of the week.
Running the Docker image as a daemon with cron running inside it makes it a lot easier to update the Docker image and also bring up on other machines.
There’s quite a few gotchas to doing this however, which I discovered and spent hours Googling the answers for. Most of the answers were dredged from Github repositories which luckily Google managed to find the keywords for. This included:
Below is the Docker file and the scripts are with the Gist.
Some relevant Stackoverflow posts that helped:
My career as a web-centric software dev started with Unix (Linux and some Solaris/BSD) and thanks to .NET Core I’m now back in that world for some of my web development. I much prefer Unix for the server, particularly as it’s far cheaper than Windows to tinker with as a developer but also its simplicity. It is made for automation - something Windows is slowly catching up with but still performs in a clunky way.
Windows Server 2016 is likely to bring Windows closer to the bash and SSH world, but you are still stuck with some strange technology choices like WinRM using WCF, when SSH was already around and COM legacy everywhere and XML as the preference for configuration (versus YAML, TOML, JSON) for lots of systems like IIS and autoattend files.
Microsoft have performed a full U-turn with their Linux strategy and us C# developers are now free from our shackles and able to use Linux and Mac for things like Docker, .NET Core, Powershell on Linux, SQL Server on Linux and the Linux Subsystem on Windows.
It makes you wonder where Microsoft would be now if the decision to do this was done 10 years ago…anyway I’ve update the Unix cheat sheet I wrote about 11 years ago (put into a CMS in 2009) to include some new knowledge and the CHMOD calculator is able to go both ways. I few Docker commands will appear there shortly too.
I had this problem today where a
dotnet restore was failing on a Linux CI server, but working on my Windows 10 dev machine. The error was:
Unable to resolve ‘System.Runtime.Serialization.Formatters (>= 4.0.0-rc4-24217-03)’ for ‘.NETCoreApp,Version=v1.0’.
It turns out I had this package in
C:\Users\MyUsername\.nuget\packages so it restored locally, but on the internet the package isn’t at nuget.org. How did I get it originally? That was a mystery that luckily another project in the solution solved by accident.
A lot of the .NET Core nuget packages are hosted on myget.org until they’re ready to be fed over to nuget.org. The solution is to add a
nuget.config file to your project, with this:
<configuration> <packageSources> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> <add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" /> </packageSources> </configuration>
One hour of my life wasted to save you 1 hour! The myget feed is currently on dotnet.myget.org
I’ve probably missed a couple, but this is a list I’ve compiled of all the CI services I know about, geared towards cheapo devs on a budget. My area of expertise is Teamcity, Octopus, Bamboo, Gitlab and a bit of Jenkins and Travis, and limited to dot net core.