Developing .NET applications without installing .NET SDK

Developing .NET applications without installing .NET SDK

I recently developed a small .NET application. I considered installing the .NET SDK on my laptop (on which I were to develop the .NET application), but was unsure of which version I would need, and how I would potentially downgrade the SDK version if needed. 

Instead of installing the SDK on my laptop, I decided to run the SDK inside a Docker container. This way I could easily switch between SDK versions if needed, as all I’d have to do is spin up another Docker container with a different version of the SDK installed. 

I created a file Dockerfile.runtime with this content that I would use for my runtime environment: 

Building the docker container the usual way:

Now that my image was build containing the SDK I needed, I was ready to run my application:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: