fix(docker): give ds services a writable HOME so sharp can load#216
Open
juliusknorr wants to merge 1 commit into
Open
fix(docker): give ds services a writable HOME so sharp can load#216juliusknorr wants to merge 1 commit into
juliusknorr wants to merge 1 commit into
Conversation
supervisord runs as root and does not reset HOME when dropping to user=ds, so the node services inherited HOME=/root and could not write their cache. sharp/pkg failed to extract its native module to /root/.cache (EACCES), disabling image processing (processImageOptimal returned the original buffer). Set HOME=/home/ds for every ds-owned program and create the directory in the standalone image so the cache is writable. Assisted-by: ClaudeCode:claude-opus-4-8 Signed-off-by: Julius Knorr <jus@bitgrid.net>
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.
Set
HOME=/home/dsfor allds-owned supervisor programs and create the directory in the standalone image.Why
supervisordruns as root and does not resetHOMEwhen dropping touser=ds, so the node services inheritedHOME=/rootand could not write their cache. sharp/pkg failed to extract its native module to/root/.cache(EACCES), which disabled image processing (processImageOptimalreturned the original buffer).Test
In a running standalone container, apply the same
HOMEenv tods-docservice/ds-converter,mkdir -p /home/ds && chown ds:ds /home/ds, restart the services, open a document containing images, and confirm theSharp module failed to load/processImageOptimal: Sharp module not availablewarnings no longer appear indocservice/out.log.AI disclosure: changes drafted with AI assistance (ClaudeCode, model claude-opus-4-8); see the
Assisted-bycommit trailer. Please review before merging.