Hi!
I have next dockerfile:
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as builder
WORKDIR /src
COPY ./Sources /src
RUN dotnet publish ./MyApp/MyApp.csproj -o /publish
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 as runtime
WORKDIR /host
COPY --from=builder /publish /host
ENTRYPOINT dotnet MyApp.dll
If I run container:
docker build -t my-app .
docker run --name my-app-container my-app
all works fine.
As an experiment, I want to launch the container without launching the application and launch the application there manually:
docker run --name my-app-container -it --entrypoint "/bin/bash" my-app
An invitation appears, I am writing:
dotnet MyApp.dll
Response:
bash: dotnet: command not found
Why doesn’t it find dotnet if everything in ENTRYPOINT in the dockerfile starts up normally?