Slim Docker runtime image#606
Draft
therobbiedavis wants to merge 2 commits into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Slims the Docker runtime image by keeping release artifacts and frontend debug/duplicate assets out of the image, publishing Docker inputs per target architecture, and tightening the runtime copy/install path for the Discord bot.
Changes
Added
amd64andarm64runtime image inputs.build:analyzescript for explicit bundle analysis builds.node_modulescopies.Changed
listenarr.api/docker-publish/${TARGETARCH}instead of broad publish output.tools/discord-botand removes npm/corepack/cache/doc residue after installing production bot dependencies.ASPNETCORE_URLS=http://*:5656before falling back to local port4545.Fixed
Removed
fe/public/large-logo.png.Testing
npm run builddotnet publish listenarr.api/Listenarr.Api.csproj -c Release -r linux-x64 --self-contained false /p:UseAppHost=falsedotnet publish listenarr.api/Listenarr.Api.csproj -c Release -r linux-arm64 --self-contained false /p:UseAppHost=falselistenarr:local-test(HTTP 200, Node present, npm absent, no frontend maps/stats/large-logo)git diff --checkdotnet format listenarr.slnx --no-restore --verify-no-changes --verbosity minimal --include listenarr.api/Program.csnpx eslint vite.config.tsNotes
The tested local amd64 Docker image was reduced to about 173 MB. The pre-commit hook hit a Windows
spawnSync npx.cmd EINVALrunner issue, so the commit used--no-verifyafter the equivalent staged checks passed manually.