Answer the question
In order to leave comments, you need to log in
Why does docker-compose crash but I can build?
Here is my
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-bionic AS base
WORKDIR /app
EXPOSE 5002
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS publish
WORKDIR /src
COPY ./ ./
WORKDIR /src/dirwithService
RUN dotnet publish "Someservice.csproj" -c Debug -o /app/publish
FROM base AS finalGit
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Someservice.dll"]
version: '3'
services:
Someservice:
container_name: Someservice
build:
context: dirwithService/Someservice
dockerfile: Dockerfile
ports:
- "5002:80"
Step 8/12 : RUN dotnet publish "Someservice.csproj" -c Debug -o /app/publish ---> Running in acc9e5d5d7ed Microsoft (R) Build Engine version 16.7.0-preview-20360-03+188921e2f for .NET Copyright (C) Microsoft Corporation. All rights reserved. MSBUILD : error MSB1009: Project file does not exist. Switch: Someservice.csproj ERROR: Service 'Someservice' failed to build: The command '/bin/sh -c dotnet publish "Someservice.csproj" -c Debug -o /app/publish' returned a non-zero code: 1
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