thangchung / clean-architecture-dotnet

🕸 Yet Another .NET Clean Architecture, but for Microservices project. It uses Minimal Clean Architecture with DDD-lite, CQRS-lite, and just enough Cloud-native patterns apply on the simple eCommerce sample and run on Tye with Dapr extension 🍻
MIT License
1.24k stars 267 forks source link

Cant build via docker in m1 #24

Open xokthilat opened 3 years ago

xokthilat commented 3 years ago

` clean-architecture-dotnet git:(main) ✗ sudo docker-compose build --no-cache postgresql uses an image, skipping placement uses an image, skipping redis uses an image, skipping settingapp-dapr uses an image, skipping customerapp-dapr uses an image, skipping productapp-dapr uses an image, skipping webapigatewayapp-dapr uses an image, skipping Building settingapp [+] Building 2.5s (15/17)
=> [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 680B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 35B 0.0s => [internal] load metadata for mcr.microsoft.com/dotnet/sdk:6.0 0.2s => [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:6.0 0.2s => [internal] load build context 0.1s => => transferring context: 33.98kB 0.1s => [build 1/7] FROM mcr.microsoft.com/dotnet/sdk:6.0@sha256:1c008d2e442b82f7dd0118999f439c5641efdcd527f40b44bff6c273d8836a04 0.0s => [base 1/2] FROM mcr.microsoft.com/dotnet/aspnet:6.0@sha256:044457748f69c79c5617cbf3c2da389e8833d8bead76a6875e9df071868bc74c 0.0s => CACHED [build 2/7] WORKDIR /src 0.0s => CACHED [base 2/2] WORKDIR /app 0.0s => CACHED [final 1/2] WORKDIR /app 0.0s => [build 3/7] COPY [samples/Setting/SettingService.Api/SettingService.Api.csproj, SettingService.Api/] 0.0s => [build 4/7] RUN dotnet restore "./SettingService.Api/SettingService.Api.csproj" 0.6s => [build 5/7] COPY . . 0.1s => [build 6/7] WORKDIR /src/SettingService.Api 0.0s => ERROR [build 7/7] RUN dotnet build "SettingService.Api.csproj" -c Release -o /app/build 1.4s

[build 7/7] RUN dotnet build "SettingService.Api.csproj" -c Release -o /app/build:

15 0.214 Microsoft (R) Build Engine version 17.0.0-preview-21302-02+018bed83d for .NET

15 0.214 Copyright (C) Microsoft Corporation. All rights reserved.

15 0.214

15 0.475 Determining projects to restore...

15 0.477 Skipping project "/src/N8T.Core/N8T.Core.csproj" because it was not found.

15 0.477 Skipping project "/src/N8T.Infrastructure.EfCore/N8T.Infrastructure.EfCore.csproj" because it was not found.

15 0.477 Skipping project "/src/N8T.Infrastructure.OTel/N8T.Infrastructure.OTel.csproj" because it was not found.

15 0.477 Skipping project "/src/N8T.Infrastructure/N8T.Infrastructure.csproj" because it was not found.

15 0.477 Skipping project "/DataContracts/CoolStore.AppContracts/CoolStore.AppContracts.csproj" because it was not found.

15 0.477 Skipping project "/DataContracts/CoolStore.IntegrationEvents/CoolStore.IntegrationEvents.csproj" because it was not found.

15 0.477 Skipping project "/src/SettingService.AppCore/SettingService.AppCore.csproj" because it was not found.

15 0.477 Skipping project "/src/SettingService.Infrastructure/SettingService.Infrastructure.csproj" because it was not found.

15 0.478 Skipping project "/src/N8T.Core/N8T.Core.csproj" because it was not found.

15 0.478 Skipping project "/src/N8T.Infrastructure.EfCore/N8T.Infrastructure.EfCore.csproj" because it was not found.

15 0.478 Skipping project "/src/N8T.Infrastructure.OTel/N8T.Infrastructure.OTel.csproj" because it was not found.

15 0.478 Skipping project "/src/N8T.Infrastructure/N8T.Infrastructure.csproj" because it was not found.

15 0.478 Skipping project "/DataContracts/CoolStore.AppContracts/CoolStore.AppContracts.csproj" because it was not found.

15 0.478 Skipping project "/DataContracts/CoolStore.IntegrationEvents/CoolStore.IntegrationEvents.csproj" because it was not found.

15 0.478 Skipping project "/src/SettingService.AppCore/SettingService.AppCore.csproj" because it was not found.

15 0.478 Skipping project "/src/SettingService.Infrastructure/SettingService.Infrastructure.csproj" because it was not found.

15 0.590 All projects are up-to-date for restore.

15 0.647 You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview

15 0.696 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../../../src/N8T.Core/N8T.Core.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 0.696 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../../../src/N8T.Infrastructure.EfCore/N8T.Infrastructure.EfCore.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 0.696 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../../../src/N8T.Infrastructure.OTel/N8T.Infrastructure.OTel.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 0.696 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../../../src/N8T.Infrastructure/N8T.Infrastructure.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 0.696 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../../DataContracts/CoolStore.AppContracts/CoolStore.AppContracts.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 0.696 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../../DataContracts/CoolStore.IntegrationEvents/CoolStore.IntegrationEvents.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 0.696 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../SettingService.AppCore/SettingService.AppCore.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 0.696 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../SettingService.Infrastructure/SettingService.Infrastructure.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 1.400 CSC : error CS5001: Program does not contain a static 'Main' method suitable for an entry point [/src/SettingService.Api/SettingService.Api.csproj]

15 1.407

15 1.407 Build FAILED.

15 1.407

15 1.407 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../../../src/N8T.Core/N8T.Core.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 1.407 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../../../src/N8T.Infrastructure.EfCore/N8T.Infrastructure.EfCore.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 1.407 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../../../src/N8T.Infrastructure.OTel/N8T.Infrastructure.OTel.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 1.407 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../../../src/N8T.Infrastructure/N8T.Infrastructure.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 1.407 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../../DataContracts/CoolStore.AppContracts/CoolStore.AppContracts.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 1.407 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../../DataContracts/CoolStore.IntegrationEvents/CoolStore.IntegrationEvents.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 1.407 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../SettingService.AppCore/SettingService.AppCore.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 1.407 /usr/share/dotnet/sdk/6.0.100-preview.5.21302.13/Microsoft.Common.CurrentVersion.targets(1966,5): warning : The referenced project '../SettingService.Infrastructure/SettingService.Infrastructure.csproj' does not exist. [/src/SettingService.Api/SettingService.Api.csproj]

15 1.408 CSC : error CS5001: Program does not contain a static 'Main' method suitable for an entry point [/src/SettingService.Api/SettingService.Api.csproj]

15 1.408 8 Warning(s)

15 1.408 1 Error(s)

15 1.408

15 1.408 Time Elapsed 00:00:01.16


executor failed running [/bin/sh -c dotnet build "SettingService.Api.csproj" -c Release -o /app/build]: exit code: 1 ERROR: Service 'settingapp' failed to build : Build failed`

im new for dotnet and docker also looking for simple architecture project for long run. seem like its trying to find main method inside docker. any help would be greatly appreciated

thangchung commented 3 years ago

@mikasaloli thanks for reporting this kind of bug, but unlucky that I'm not using Mac M1 right now to develop so I cannot reproduce this bug. If anyone has Mac M1, I would like he/she can help me with that

murugaratham commented 2 years ago

It doesn’t look like it got anything to do with m1, looks more like build path is wrong