Answer the question
In order to leave comments, you need to log in
How to deploy a .net assembly to docker?
I have a build on .net
The developer says it's ready and I don't need to do restore and publish, there's also nginx and kestrel.
In general, I decided at the beginning to just deploy .net myself. I ran
into a problem that the docker container has the exited status, and in the docker container logs bash: build1: No such file or directory
Dockerfile:
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
WORKDIR /app
COPY . .
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
WORKDIR /app
COPY . .
EXPOSE 80
ENTRYPOINT ["bash"]
CMD ["build1", "WebApplication4.dll"]
ran without
ENTRYPOINT ["bash"]
error
Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"build1\": executable file not found in $PATH": unknown docker logs
My project files
appsettings.Development.json
appsettings .json
Dockerfile
WebApplication4
WebApplication4.deps.json
WebApplication4.dll
WebApplication4.pdb
WebApplication4.runtimeconfig.json
WebApplication4.Views.dll
WebApplication4.Views.pdb
web.config
wwwroot
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question