Skip to content

App does not have to be publised before Docker image add #42740

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

Closed
deep-outcome opened this issue Sep 27, 2024 · 3 comments · Fixed by #42760
Closed

App does not have to be publised before Docker image add #42740

deep-outcome opened this issue Sep 27, 2024 · 3 comments · Fixed by #42760
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

@deep-outcome
Copy link
Contributor

deep-outcome commented Sep 27, 2024

Type of issue

Missing information

Description

From https://learn.microsoft.com/en-us/dotnet/core/docker/build-container?view=vs-2022&tabs=windows&pivots=dotnet-8-0#publish-net-app

Before adding the .NET app to the Docker image, first it must be published. It's best to have the container run the published version of the app.

This could be true but it is not for Dockefile used.

# Copy everything
COPY . ./
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release
RUN dotnet publish -c Release -o out
…

These lines take care of building/publishing.

If this would be the case, then lines were be

# Copy everything
COPY . ./
# Build runtime imageCOPY --from=build-env App/bin/Release/net8.0/ .
…

Page URL

https://learn.microsoft.com/en-us/dotnet/core/docker/build-container?view=vs-2022&tabs=windows&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 - 319943

@IEvangelist
Copy link
Member

Thank you for posting this issue @bravequickcleverfibreyarn

You're not wrong. It was intentionally explained this way so that the consumer understands that the app needs to be published. We explain it outside the context of the Dockerfile as it's good to know it's not specific to building the container image. But I do see your point, we could probably improve this experience. Would you be interested in providing a PR and I'll review it?

@deep-outcome
Copy link
Contributor Author

I'll try some in upcoming days.

@deep-outcome
Copy link
Contributor Author

Okay. I find a minute today. Please check with #42760.

@IEvangelist IEvangelist self-assigned this Sep 30, 2024
@dotnet-policy-service dotnet-policy-service bot added the in-pr This issue will be closed (fixed) by an active pull request. label Sep 30, 2024
@IEvangelist IEvangelist added doc-enhancement 🗺️ reQUEST Triggers an issue to be imported into Quest. and removed ⌚ Not Triaged Not triaged in-pr This issue will be closed (fixed) by an active pull request. labels Sep 30, 2024
@dotnetrepoman dotnetrepoman bot added 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. and removed 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. labels Sep 30, 2024
@IEvangelist IEvangelist added 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. and removed Pri2 labels Sep 30, 2024
@dotnetrepoman dotnetrepoman bot added 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. and removed 🗺️ mapQUEST Only used as a way to mark an issue as updated for quest. RepoMan should instantly remove it. labels Sep 30, 2024
@github-project-automation github-project-automation bot moved this from 🔖 Ready to ✅ Done in dotnet/docs September 2024 Sprint Sep 30, 2024
@dotnet-policy-service dotnet-policy-service bot added the in-pr This issue will be closed (fixed) by an active pull request. label Sep 30, 2024
@sequestor sequestor bot removed the 🗺️ reQUEST Triggers an issue to be imported into Quest. label Oct 1, 2024
@sequestor sequestor bot added the 📌 seQUESTered Identifies that an issue has been imported into Quest. label Oct 1, 2024
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
No open projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants