Skip to content

Commit

Permalink
fix(docker): ensure $HOME is set consistently for all configs.
Browse files Browse the repository at this point in the history
Node uses a .cache directory in $HOME. The default node user has this
set to /home/node, a randomly invented user has / under Docker and
nothing under Podman.

If we set it manually (to /) we get to choose a fixed location and
ensure it's writable for all users.
  • Loading branch information
wplinge authored and jorenn92 committed Feb 9, 2024
1 parent 7a83b43 commit f952bba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ RUN corepack install && \

USER node

# Picked up for Node's .cache directory.
ENV HOME=/

EXPOSE 6246

VOLUME [ "/opt/data" ]
Expand Down

0 comments on commit f952bba

Please sign in to comment.