FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build-env RUN apt-get update && \ apt-get install -y --no-install-recommends unzip procps && \ rm -rf /var/lib/apt/lists/* RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg COPY id_rsa.pub ./authorized_keys RUN mkdir ~/.ssh/ RUN mv /authorized_keys ~/.ssh/authorized_keys RUN apt-get update RUN apt-get install unzip RUN apt-get install openssh-server unzip curl -y RUN apt-get install emacs24-nox -y WORKDIR /app COPY *.csproj ./ RUN dotnet restore COPY . ./ RUN dotnet publish -c Debug -o out FROM mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim AS base FROM base WORKDIR /app COPY --from=build-env /app/out ./ EXPOSE 22 ENTRYPOINT ["dotnet", "IotEdgeModule1.dll"]