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 improvements #474

Merged

Conversation

whimsical-c4lic0
Copy link
Collaborator

This PR makes 3 changes

  • Automatically generate default auth.json and config.json files similar to the windows build process instead of using the previously hard-coded values
  • Specify the alpine version (should help to maintain consistent builds in the future when alpine has a new version)
  • Add the tini init system as a best practice for containers

@melithine
Copy link
Collaborator

Might be worth making it pass hadolint while we're at it?

@@ -13,10 +13,23 @@ WORKDIR "/src"
# Build release
RUN dotnet publish -p:Version=$VERSION -c Release --self-contained true -p:PublishSingleFile=true -o out
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if we suppressed warnings during the GHAs since at that point they just balloon the logs. I want to take a crack at clearing them up in the future, but by the time the GHAs run, the tag is already cut, so it's already too late to fix them for that release. I'll set up at an action that triggers on PRs in the future once we get the current crop handled.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure the best way to do this. As far as I can tell, the warnings are created by MSBuild. The dotnet publish command supports setting the verbosity (https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-publish). We could set that to silent. It's hard to tell locally, but I don't think that affects the MSBuild output though.

@whimsical-c4lic0
Copy link
Collaborator Author

Sounds good. I can post an update with both of those changes later. Looks like hadolint only wants ADD changed to COPY and packages installed with apk to be pinned to a specific version.

@sim0n00ps sim0n00ps merged commit 1c5353d into sim0n00ps:master Jul 19, 2024
@whimsical-c4lic0 whimsical-c4lic0 deleted the feature/docker-improvements branch July 19, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants