Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker build error #16793

Closed
fuzzbuzzz opened this issue Sep 24, 2024 Discussed in #16366 · 4 comments · Fixed by #16821
Closed

docker build error #16793

fuzzbuzzz opened this issue Sep 24, 2024 Discussed in #16366 · 4 comments · Fixed by #16821
Labels
Milestone

Comments

@fuzzbuzzz
Copy link

Discussed in #16366

Originally posted by tcobbfis June 24, 2024
In order to meet security requirements (45 day password expire), I need to change the users module (login function). When trying to edit and build with source code I get the error below.

Also, is editing the source the right way to make this change? I tried creating an altered users module over the weekend, but had trouble when trying to replace the built in users module with it.

PS C:\Repos\Orchard> docker compose up --build
2024/06/24 11:32:47 http2: server: error reading preface from client //./pipe/dockerDesktopLinuxEngine: file has already been closed
[+] Building 15.2s (9/9) FINISHED docker:desktop-linux
=> [fisorchard internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 371B 0.0s
=> [fisorchard internal] load metadata for mcr.microsoft.com/dotnet/sdk:8.0 0.9s
=> [fisorchard internal] load .dockerignore 0.1s
=> => transferring context: 291B 0.0s
=> [fisorchard build-env 1/5] FROM mcr.microsoft.com/dotnet/sdk:8.0@sha256:3189e564f19e016a43838a46609fc81349f07322fdf6bc3299bd13f0dca9e647 0.0s
=> [fisorchard internal] load build context 1.8s
=> => transferring context: 1.12MB 1.7s
=> CACHED [fisorchard build-env 2/5] WORKDIR /app 0.0s
=> CACHED [fisorchard build-env 3/5] COPY ./src /app 0.0s
=> CACHED [fisorchard build-env 4/5] COPY Directory.Build.props / 0.0s
=> ERROR [fisorchard build-env 5/5] RUN dotnet publish /app/OrchardCore.Cms.Web -c Release -o ./build/release --framework net8.0 /p:RunAnalyzers=false 12.3s

[fisorchard build-env 5/5] RUN dotnet publish /app/OrchardCore.Cms.Web -c Release -o ./build/release --framework net8.0 /p:RunAnalyzers=false:
1.384 Determining projects to restore...
11.73 /usr/share/dotnet/sdk/8.0.302/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(96,5): error NETSDK1013: The TargetFramework value '' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. [/app/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj]


failed to solve: process "/bin/sh -c dotnet publish /app/OrchardCore.Cms.Web -c Release -o ./build/release --framework net8.0 /p:RunAnalyzers=false" did not complete successfully: exit code: 1

Copy link
Contributor

Thank you for submitting your first issue, awesome! 🚀 We're thrilled to receive your input. If you haven't completed the template yet, please take a moment to do so. This ensures that we fully understand your feature request or bug report. On what happens next, see the docs.

If you like Orchard Core, please star our repo and join our community channels.

@fuzzbuzzz
Copy link
Author

hi there,

When I have forked the 2.0.0 release branch (https://github.com/OrchardCMS/OrchardCore/releases/tag/v2.0.0) and executing the docker build . command, I'm receiving this error:

` => ERROR [build-env 5/5] RUN dotnet publish /app/OrchardCore.Cms.Web -c Release -o ./build/release --framework net8.0 /p:RunAnalyzers=false 2.6s

[build-env 5/5] RUN dotnet publish /app/OrchardCore.Cms.Web -c Release -o ./build/release --framework net8.0 /p:RunAnalyzers=false:
0.507 Determining projects to restore...
2.565 /usr/share/dotnet/sdk/8.0.402/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(96,5): error NETSDK1013: The TargetFramework value '' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. [/app/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj]


Dockerfile:12

10 | COPY Directory.Build.props /
11 |
12 | >>> RUN dotnet publish /app/OrchardCore.Cms.Web -c Release -o ./build/release --framework net8.0 /p:RunAnalyzers=false
13 |
14 | # Build runtime image

ERROR: failed to solve: process "/bin/sh -c dotnet publish /app/OrchardCore.Cms.Web -c Release -o ./build/release --framework net8.0 /p:RunAnalyzers=false" did not complete successfully: exit code: 1
`

Can someone advise? 💯

Thank you

@sebastienros sebastienros added this to the 2.1 milestone Oct 3, 2024
Copy link
Contributor

github-actions bot commented Oct 3, 2024

We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.

@sebastienros
Copy link
Member

I can reproduce the issue locally. I am having issue copying the Directory.Packages.props file which is required.

sebastienros added a commit that referenced this issue Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants