Posts

Showing posts from May, 2018

Creating a Dockerfile

I will break down and explain what is inside a basic default Dockerfile for an ASP.NET Core application that will be containerized. I took the Dockerfile sample from here:  https://docs.docker.com/engine/examples/dotnetcore/#create-a-dockerfile-for-an-aspnet-core-application I will put comments with a "#" sign with my explanations. The image "microsoft/aspnetcore-build:2.0" information and location can be found here:  https://hub.docker.com/r/microsoft/aspnetcore-build/ https://hub.docker.com  is basically like GitHub, but for Docker images.  You cannot store Docker images in a regular GitHub (or similar) repo, they have a special format they are stored in and therefore require something like Docker Hub or Azure Container Registry. You will require some container knowledge to understand below. Also note, below is a multi-stage build Dockerfile. For full documentation on those see here:  https://docs.docker.com/develop/develop-images/multistage-build/ ####