I have asp.net core solution, that contains 3 projects.
I want to deploy it to the docker container.
Here is how the solution looks like
Here is tree of solution
TooSeeWeb
|- aspnet-core(folder)
|-TooSeeWeb (folder)
|- TooSeeWeb.sln
|-Dockerfile
|- TooSeeWeb
|- TooSeeWeb.csproj
|- TooSeeWeb.Core(folder)
|- TooSeeWeb.Core.csproj
|- TooSeeWeb.Infrastructure(folder)
|- TooSeeWeb.Infrastructure.csproj
Here is my dockerfile
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY *.sln ./
COPY TooSeeWeb/*.csproj ./TooSeeWeb/
COPY TooSeeWeb.Core/*.csproj ./TooSeeWeb.Core/
COPY TooSeeWeb.Infrastructure/.*csproj ./TooSeeWeb.Infrastructure/
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
WORKDIR /app/TooSeeWeb
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "tooseeweb.dll"]
My problem, that when I try to do docker build - < Dockerfile
I got this error
Step 3/13 : COPY *.sln ./ COPY failed: no source files were specified
How I can fix this?
.slnfile is @LinPylscommand in terminal. I see my.slnfile @LinPy