Closed kill136 closed 7 months ago
ERROR: failed to solve: process "/bin/sh -c dotnet build \"./Service.csproj\" -c $BUILD_CONFIGURATION -o /app/build" did not complete successfully: exit code: 1
Just tested on Windows:
d:\tmp\>docker version
Client:
Cloud integration: v1.0.35+desktop.11
Version: 25.0.3
API version: 1.44
Go version: go1.21.6
Git commit: 4debf41
Built: Tue Feb 6 21:13:02 2024
OS/Arch: windows/amd64
Context: default
Server: Docker Desktop 4.28.0 (139021)
Engine:
Version: 25.0.3
API version: 1.44 (minimum version 1.24)
Go version: go1.21.6
Git commit: f417435
Built: Tue Feb 6 21:14:25 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.28
GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
d:\tmp\>docker build .
[+] Building 53.2s (21/21) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 1.85kB 0.0s
=> [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:7.0-alpine 0.7s
=> [internal] load metadata for mcr.microsoft.com/dotnet/sdk:7.0-jammy 0.6s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 314B 0.0s
=> [build 1/9] FROM mcr.microsoft.com/dotnet/sdk:7.0-jammy@sha256:e7878437b5a941a5be8cabee60435459161e4ef6ebf49757d733c1097620337a 23.2s
=> => resolve mcr.microsoft.com/dotnet/sdk:7.0-jammy@sha256:e7878437b5a941a5be8cabee60435459161e4ef6ebf49757d733c1097620337a 0.1s
=> => sha256:e7878437b5a941a5be8cabee60435459161e4ef6ebf49757d733c1097620337a 1.08kB / 1.08kB 0.0s
=> => sha256:01161b79358d9dc7df2cc679d2bcb2c3d7f2090342f42e71ee2c8d482a1d5995 2.01kB / 2.01kB 0.0s
=> => sha256:cd132a6396ccb58afa986a48bf1d8e9302e83e153fd52e797ccbc0fc4d909f5c 5.94kB / 5.94kB 0.0s
=> => sha256:23828d760c7b04df02891af556c40ca44c2dd79d6837ea6f18fac24f4108448c 30.45MB / 30.45MB 2.9s
=> => sha256:8016f0672d2e07c6957fee016671152e40af92a530c12d1c512675c57522b4a9 15.79MB / 15.79MB 1.9s
=> => sha256:150936f2b4f235f1ec596b8a12dc7c35b4878118f7e291cfd24bf69020858373 32.46MB / 32.46MB 3.1s
=> => sha256:33ff6b95cd87da9f34116323b15b55944fd78c9434df2a0422e7a55a26115c84 156B / 156B 2.1s
=> => sha256:9a46a56ae3380acc2fe6249874c2759932b87e9073cb9c13b902ca35df3d1771 10.12MB / 10.12MB 3.0s
=> => sha256:9642339c88cfe9f16ede555ef1002b2b066be71e615b40a5d7189dcbdc515949 20.75MB / 20.75MB 4.6s
=> => extracting sha256:23828d760c7b04df02891af556c40ca44c2dd79d6837ea6f18fac24f4108448c 1.7s
=> => sha256:cccc2213f9eb02b3a16f7e0751c9b982e68f6143f9b3f67ef3e4f78c3d123302 180.69MB / 180.69MB 11.6s
=> => sha256:a6bc3c72672e62ac07829de75b8bd41c3ea6f80cac9d50f71604daaace80ca8f 14.00MB / 14.00MB 4.5s
=> => extracting sha256:8016f0672d2e07c6957fee016671152e40af92a530c12d1c512675c57522b4a9 0.5s
=> => extracting sha256:150936f2b4f235f1ec596b8a12dc7c35b4878118f7e291cfd24bf69020858373 0.7s
=> => extracting sha256:33ff6b95cd87da9f34116323b15b55944fd78c9434df2a0422e7a55a26115c84 0.0s
=> => extracting sha256:9a46a56ae3380acc2fe6249874c2759932b87e9073cb9c13b902ca35df3d1771 0.2s
=> => extracting sha256:9642339c88cfe9f16ede555ef1002b2b066be71e615b40a5d7189dcbdc515949 1.3s
=> => extracting sha256:cccc2213f9eb02b3a16f7e0751c9b982e68f6143f9b3f67ef3e4f78c3d123302 9.9s
=> => extracting sha256:a6bc3c72672e62ac07829de75b8bd41c3ea6f80cac9d50f71604daaace80ca8f 0.9s
=> [internal] load build context 1.9s
=> => transferring context: 4.24MB 1.8s
=> [base 1/3] FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine@sha256:4be7f267bc80890df90024a7e1d143ba67f673f948b3ad75d69c5fd2bba86e6b 8.5s
=> => resolve mcr.microsoft.com/dotnet/aspnet:7.0-alpine@sha256:4be7f267bc80890df90024a7e1d143ba67f673f948b3ad75d69c5fd2bba86e6b 0.1s
=> => sha256:4be7f267bc80890df90024a7e1d143ba67f673f948b3ad75d69c5fd2bba86e6b 1.08kB / 1.08kB 0.0s
=> => sha256:1b080f7f67f3f313d6b7d48b33bfc9bdf5c7d7d8c5759a430254a81d3c9379a9 1.16kB / 1.16kB 0.0s
=> => sha256:c1987cb48fc6920bd505f5e4c2f80cb8096cfeee385193c8b1a19a1462d62726 3.12kB / 3.12kB 0.0s
=> => sha256:4abcf20661432fb2d719aaf90656f55c287f8ca915dc1c92ec14ff61e67fbaf8 3.41MB / 3.41MB 4.9s
=> => sha256:6e3fc0d0a1cef829060a6ab84b6989e2830606c984a9579c388c82bfc621ba59 2.15MB / 2.15MB 5.0s
=> => extracting sha256:4abcf20661432fb2d719aaf90656f55c287f8ca915dc1c92ec14ff61e67fbaf8 0.1s
=> => sha256:57975de2e55efaca387a3f7a93bb012e0b46b2047ab7f0b6dcad0356f6124f60 32.02MB / 32.02MB 7.2s
=> => sha256:5a1331d21f608638286dfd1f5e8bcf076e164ee1ad35ba80d15eb8866b46d70c 10.12MB / 10.12MB 6.0s
=> => extracting sha256:6e3fc0d0a1cef829060a6ab84b6989e2830606c984a9579c388c82bfc621ba59 0.1s
=> => extracting sha256:57975de2e55efaca387a3f7a93bb012e0b46b2047ab7f0b6dcad0356f6124f60 0.6s
=> => extracting sha256:5a1331d21f608638286dfd1f5e8bcf076e164ee1ad35ba80d15eb8866b46d70c 0.2s
=> [base 2/3] RUN adduser -D -h /app -s /bin/sh km && chown -R km.km /app 1.3s
=> [base 3/3] WORKDIR /app 0.2s
=> [final 1/2] WORKDIR /app 0.1s
=> [build 2/9] WORKDIR /src 0.7s
=> [build 3/9] COPY [service/Service/Service.csproj, service/Service/] 0.1s
=> [build 4/9] RUN dotnet restore "./service/Service/./Service.csproj" 7.9s
=> [build 5/9] COPY [extensions, extensions] 0.2s
=> [build 6/9] COPY [tools, tools] 0.1s
=> [build 7/9] COPY [service, service] 0.2s
=> [build 8/9] WORKDIR /src/service/Service 0.1s
=> [build 9/9] RUN dotnet build "./Service.csproj" -c Release -o /app/build 10.2s
=> [publish 1/1] RUN dotnet publish "./Service.csproj" -c Release -o /app/publish /p:UseAppHost=false 8.1s
=> [final 2/2] COPY --from=publish --chown=km:km --chmod=0550 /app/publish . 0.3s
=> exporting to image 0.7s
=> => exporting layers 0.7s
=> => writing image sha256:3901d6edf6e6e48e20e85d183820051b939aeccccf4cb0e4419c03a0b7cee29a
Context / Scenario
when i run Dockerfile docker build -t kernelmemory . ,a error come up,below
What happened?
ame 'JsonPropertyOrder' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(107,10): error CS0246: The type or namespace name 'JsonPropertyNameAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(107,10): error CS0246: The type or namespace name 'JsonPropertyName' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(113,10): error CS0246: The type or namespace name 'JsonPropertyOrderAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(113,10): error CS0246: The type or namespace name 'JsonPropertyOrder' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(114,10): error CS0246: The type or namespace name 'JsonPropertyNameAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(114,10): error CS0246: The type or namespace name 'JsonPropertyName' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(122,10): error CS0246: The type or namespace name 'JsonPropertyOrderAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(122,10): error CS0246: The type or namespace name 'JsonPropertyOrder' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(123,10): error CS0246: The type or namespace name 'JsonPropertyNameAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(123,10): error CS0246: The type or namespace name 'JsonPropertyName' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(124,10): error CS0246: The type or namespace name 'JsonIgnoreAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(124,10): error CS0246: The type or namespace name 'JsonIgnore' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(124,33): error CS0103: The name 'JsonIgnoreCondition' does not exist in the current context [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(168,10): error CS0246: The type or namespace name 'JsonPropertyOrderAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(168,10): error CS0246: The type or namespace name 'JsonPropertyOrder' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(169,10): error CS0246: The type or namespace name 'JsonPropertyNameAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(169,10): error CS0246: The type or namespace name 'JsonPropertyName' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(175,10): error CS0246: The type or namespace name 'JsonPropertyOrderAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(175,10): error CS0246: The type or namespace name 'JsonPropertyOrder' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(176,10): error CS0246: The type or namespace name 'JsonPropertyNameAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(176,10): error CS0246: The type or namespace name 'JsonPropertyName' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(177,10): error CS0246: The type or namespace name 'JsonIgnoreAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(177,10): error CS0246: The type or namespace name 'JsonIgnore' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(177,33): error CS0103: The name 'JsonIgnoreCondition' does not exist in the current context [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(183,10): error CS0246: The type or namespace name 'JsonPropertyOrderAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(183,10): error CS0246: The type or namespace name 'JsonPropertyOrder' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(184,10): error CS0246: The type or namespace name 'JsonPropertyNameAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(184,10): error CS0246: The type or namespace name 'JsonPropertyName' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(193,10): error CS0246: The type or namespace name 'JsonPropertyOrderAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(193,10): error CS0246: The type or namespace name 'JsonPropertyOrder' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(194,10): error CS0246: The type or namespace name 'JsonPropertyNameAttribute' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 /src/service/Abstractions/Pipeline/DataPipeline.cs(194,10): error CS0246: The type or namespace name 'JsonPropertyName' could not be found (are you missing a using directive or an assembly reference?) [/src/service/Abstractions/Abstractions.csproj] 99.21 588 Warning(s) 99.21 668 Error(s) 99.21 99.21 Time Elapsed 00:01:37.78
Dockerfile:25
23 | COPY ["service", "service"] 24 | WORKDIR "/src/service/Service" 25 | >>> RUN dotnet build "./Service.csproj" -c $BUILD_CONFIGURATION -o /app/build 26 | 27 | FROM build AS publish
ERROR: failed to solve: process "/bin/sh -c dotnet build \"./Service.csproj\" -c $BUILD_CONFIGURATION -o /app/build" did not complete successfully: exit code: 1
Importance
edge case
Platform, Language, Versions
1Docker Desktop 2.windows 11 64bit 3.vs 2022
Relevant log output
No response