Skip to content

fix(docker): give ds services a writable HOME so sharp can load#216

Open
juliusknorr wants to merge 1 commit into
mainfrom
fix/ds-home-sharp-cache
Open

fix(docker): give ds services a writable HOME so sharp can load#216
juliusknorr wants to merge 1 commit into
mainfrom
fix/ds-home-sharp-cache

Conversation

@juliusknorr

@juliusknorr juliusknorr commented Jun 18, 2026

Copy link
Copy Markdown
Member

Set HOME=/home/ds for all ds-owned supervisor programs and create the directory in the standalone image.

Why

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), which disabled image processing (processImageOptimal returned the original buffer).

Test

In a running standalone container, apply the same HOME env to ds-docservice/ds-converter, mkdir -p /home/ds && chown ds:ds /home/ds, restart the services, open a document containing images, and confirm the Sharp module failed to load / processImageOptimal: Sharp module not available warnings no longer appear in docservice/out.log.


AI disclosure: changes drafted with AI assistance (ClaudeCode, model claude-opus-4-8); see the Assisted-by commit trailer. Please review before merging.

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>
@juliusknorr juliusknorr requested a review from a team as a code owner June 18, 2026 10:29
@juliusknorr juliusknorr requested review from chrip and removed request for a team June 18, 2026 10:29
@juliusknorr juliusknorr added nc-report log-finding Log finding bug Something isn't working labels Jun 18, 2026
@juliusknorr juliusknorr self-assigned this Jun 18, 2026
@juliusknorr juliusknorr moved this from 📄 To do to 👀 In review in 📄 Euro-Office team Jun 18, 2026
@juliusknorr juliusknorr requested a review from a team June 26, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working log-finding Log finding nc-report

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

1 participant