From d1d2bf4c66e4da5a680e5b7c2baf3b937359f9ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Valenti=C4=87?= Date: Mon, 21 Oct 2024 12:53:46 +0200 Subject: [PATCH] issue 62 fix Adding the HOME variable makes the Docker build process create and use the /httpbin/.local folder in both build and runtime. Without this, the Dockerfile creates a folder /root/.local and uses it while the specified user is root. However, in the case of a user override with runAsUser or a similar command, /root is no longer the home directory and is not accessible to the non-root user. This line fixes this issue. It has been fixed and tested locally. --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aadf473..1225f90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,10 +5,12 @@ LABEL description="A simple HTTP service." ENV LC_ALL=C.UTF-8 ENV LANG=C.UTF-8 +ENV HOME=/httpbin + +WORKDIR /httpbin RUN apt update -y && apt install python3-pip libssl-dev libffi-dev git -y && pip3 install --no-cache-dir pipenv -WORKDIR /httpbin ADD . . RUN pipenv sync