Runar Ovesen Hjerpbakk

Programmer. Software Architect. Technical Manager.

Docker

Script for creating transparent PNGs

Introducing transparent-png, a simple Python script for creating a transparent PNG of a given size.

Read More

DNS worked using Docker run but not in Docker Compose

I created an API internal to our organization today. The API needed to access an SQL Server database and worked perfectly running on my local machine on the corporate network.

Then the time came to run it in a Docker container. And it failed. The API could not connect to the SQL database.

Read More

Creating an ASP.Net Core app with a React frontend and Docker hosting

I started a new project this week, a SPA written in React with an ASP.Net Core 2.1.1 backend hosted in a Docker container. This is the tale of how I got all those pieces working together.

The running code from this article can be seen on GitHub.

Read More

.dockerignore is your friend

While working on a particular project built with a multi-stage Dockerfile I got this error:

Step 13/19 : RUN dotnet test "./DashboardServerTests/DashboardServerTests.csproj" -c Release --no-restore
 ---> Running in ac850e55464c
Build started, please wait...
/usr/share/dotnet/sdk/2.0.3/Sdks/Microsoft.NET.Sdk/build/Microsoft.PackageDependencyResolution.targets(323,5): error : Assets file '/Users/sankra/projects/DashboardServer/Grafana/obj/project.assets.json' not found. Run a NuGet package restore to generate this file. [/source/Grafana/Grafana.csproj]

Read More

Running ASP.Net Core web app in a Docker container using a multi-stage Dockerfile

Lately. I’ve written multiple web applications with ASP.Net Core. Together with C# newfound cross-platformness, this stack is a joy to work with.

I user Docker to run the applications, some in Azure, some on on-premise Linux boxes. This has thought me a couple of things. Firstly, the app should be built from within a container using a multi-stage Dockerfile.

Read More