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 failed #15648

Closed
infofromca opened this issue Apr 3, 2024 · 6 comments · Fixed by #15784
Closed

docker build failed #15648

infofromca opened this issue Apr 3, 2024 · 6 comments · Fixed by #15784
Labels
Milestone

Comments

@infofromca
Copy link
Contributor

infofromca commented Apr 3, 2024

Describe the bug

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'the root folder of cms.web'

  2. docker build --build-arg TARGETOS=linux -t linuxoc .

  3. See error
    /app/OrchardCore/Directory.Build.props(3,3): error MSB4019: The imported project "/Directory.Build.props" was not found. Confirm that the expression in the Import declaration "../../Directory.Build.props" is correct, and that the file exists on disk. [/app/OrchardCore/OrchardCore.Application.Cms.Targets/OrchardCore.Application.Cms.Targets.csproj]
    24.28 /app/OrchardCore/Directory.Build.props(3,3): error MSB4019: The imported project "/Directory.Build.props" was not found. Confirm that the expression in the Import declaration "../../Directory.Build.props" is correct, and that the file exists on disk. [/app/OrchardCore/OrchardCore.AuditTrail.Abstractions/OrchardCore.AuditTrail.Abstractions.csproj]
    24.29 /app/OrchardCore.Modules/Directory.Build.props(3,3): error MSB4019: The imported project "/Directory.Build.props" was not found. Confirm that the expression in the Import declaration "../../Directory.Build.props" is correct, and that the file exists on disk. [/app/OrchardCore.Modules/OrchardCore.Autoroute/OrchardCore.Autoroute.csproj]
    24.29 /app/OrchardCore.Modules/Directory.Build.props(3,3): error MSB4019: The imported project "/Directory.Build.props" was not found. Confirm that the expression in the Import declaration "../../Directory.Build.props" is correct, and that the file exists on disk. [/app/OrchardCore.Modules/OrchardCore.Alias/OrchardCore.Alias.csproj]
    24.29 /app/OrchardCore/Directory.Build.props(3,3): error MSB4019: The imported project "/Directory.Build.props" was not found. Confirm that the expression in the Import declaration "../../Directory.Build.props" is correct, and that the file exists on disk. [/app/OrchardCore/OrchardCore.Admin.Abstractions/OrchardCore.Admin.Abstractions.csproj]

Expected behavior

A clear and concise description of what you expected to happen.

4 because file Directory.Build.props under first OrchardCore is outside src which could not be copied to /app
by this COPY ./src /app

@Piedone
Copy link
Member

Piedone commented Apr 3, 2024

Apart from publishing to Docker Hub, what does the preview build do differently that it works?

@infofromca
Copy link
Contributor Author

did the preview use dockerfile

@Piedone
Copy link
Member

Piedone commented Apr 3, 2024

@infofromca
Copy link
Contributor Author

CLICK the link of -CI, I could not find dockerfile which COPY ./src /app on line 9

@sebastienros
Copy link
Member

I confirm the Dockerfile is broken because Directory.Build.props is not imported. The COPY ./src /app should be changed/

@sebastienros sebastienros added this to the 1.9 milestone Apr 11, 2024
@sebastienros
Copy link
Member

For @Piedone the preview in CI is actually copying the already built folder that the CI produced. We have two docker files in the root folder.

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.

3 participants