This question should hopefully be pretty straight forward.
Say you're trying to run an Asp.Net Core Web Api. The app will run inside of a Docker container inside a clean installation of Linux (flavor doesn't really matter). The container lives inside a POD in a Kubernetes cluster which comes with docker tools.
The Dockerfile needs to target a specific version of aspnetcore and looks something like this:
FROM microsoft/aspnetcore:1.1
COPY . /app
WORKDIR /app
EXPOSE 5000/tcp
ENV ASPNETCORE_URLS http://*:5000
ENTRYPOINT ["dotnet", "run"]
Testing things out, I run a Docker command as so...
So what I'm stumped on is this; that "dotnet" command in the ENTRYPOINT definition I'm assuming is running the .Net Core SDK.
If the container on this Linux agent does not have the SDK installed, or the SDK that is installed is an older version that the SDK that you're trying to use, how exactly would you get this to docker build? Essentially that "dotnet" command in the ENTRYPOINT is referring to a program that doesn't exist?
Am I supposed to package the SDK with the container as well? If so, should that line read ENTRYPOINT ["./dotnet", "run"] because it's on Linux? Also if so, what other steps do I need to perform to package the SDK?
My assumption was that the SDK is packaged already in the container with microsoft/aspnetcore:1.1? If so, is there a way to reference the packged executable in the ENTRYPOINT definition?
Any insight would be greatly appreciated!
If you need the SDK, I think you want https://hub.docker.com/r/microsoft/aspnetcore-build/.
The image you're using includes just the runtime, not the SDK.