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

Outdated Dockerfile #42775

Closed
EmilCataranciuc opened this issue Oct 1, 2024 · 0 comments · Fixed by #44170
Closed

Outdated Dockerfile #42775

EmilCataranciuc opened this issue Oct 1, 2024 · 0 comments · Fixed by #44170
Assignees
Labels
dotnet-docker/subsvc dotnet-fundamentals/svc in-pr This issue will be closed (fixed) by an active pull request. 📌 seQUESTered Identifies that an issue has been imported into Quest.

Comments

@EmilCataranciuc
Copy link

EmilCataranciuc commented Oct 1, 2024

Type of issue

Other (describe below)

Description

As per the latest official documentation for the following Dockerfile command:
# Build and publish a release
RUN dotnet publish -c Release -o out

.NET 7.0.200 SDK and later
If you specify the --output option when running this command on a solution, the CLI will emit a warning (an error in 7.0.200) due to the unclear semantics of the output path. The --output option is disallowed because all outputs of all built projects would be copied into the specified directory, which isn't compatible with multi-targeted projects, as well as projects that have different versions of direct and transitive dependencies. For more information, see Solution-level --output option no longer valid for build-related commands.

According to the relevant linked article the "Recommended action" is to remove the -o (--output) option and replace
COPY --from=build-env /App/out .

with

COPY --from=build-env /App/bin/[configuration]/[framework]/[runtime]/publish/ .

Page URL

https://learn.microsoft.com/en-us/dotnet/core/docker/build-container?tabs=linux&pivots=dotnet-8-0

Content source URL

https://github.com/dotnet/docs/blob/main/docs/core/docker/build-container.md

Document Version Independent Id

58d57b81-4ca6-6536-8788-f212402b41a7

Article author

@IEvangelist

Metadata

  • ID: 4c7470d2-9a57-7654-e13a-4f912898f7aa
  • Service: dotnet-fundamentals
  • Sub-service: dotnet-docker

Related Issues


Associated WorkItem - 360317

@dotnetrepoman dotnetrepoman bot added ⌚ Not Triaged Not triaged labels Oct 1, 2024
@IEvangelist IEvangelist self-assigned this Jan 6, 2025
@IEvangelist IEvangelist added the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Jan 6, 2025
@dotnet-policy-service dotnet-policy-service bot removed the ⌚ Not Triaged Not triaged label Jan 6, 2025
@dotnetrepoman dotnetrepoman bot added the 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Jan 6, 2025
@dotnet-policy-service dotnet-policy-service bot removed the 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. label Jan 6, 2025
@sequestor sequestor bot added 📌 seQUESTered Identifies that an issue has been imported into Quest. and removed 🗺️ reQUEST Triggers an issue to be imported into Quest. labels Jan 7, 2025
@dotnet-policy-service dotnet-policy-service bot added the in-pr This issue will be closed (fixed) by an active pull request. label Jan 7, 2025
@github-project-automation github-project-automation bot moved this from 🔖 Ready to ✅ Done in dotnet/docs January 2025 sprint project Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-docker/subsvc dotnet-fundamentals/svc in-pr This issue will be closed (fixed) by an active pull request. 📌 seQUESTered Identifies that an issue has been imported into Quest.
Projects
Development

Successfully merging a pull request may close this issue.

2 participants