From f952bbaf103aeb90cf088742cf46bd8ca61b1477 Mon Sep 17 00:00:00 2001 From: Walter Plinge <158823758+wplinge@users.noreply.github.com> Date: Thu, 8 Feb 2024 14:31:38 +0000 Subject: [PATCH] fix(docker): ensure $HOME is set consistently for all configs. 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. --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 6e7dcc08..be40b100 100644 --- a/Dockerfile +++ b/Dockerfile @@ -103,6 +103,9 @@ RUN corepack install && \ USER node +# Picked up for Node's .cache directory. +ENV HOME=/ + EXPOSE 6246 VOLUME [ "/opt/data" ]