From 35316fcdd95f96616601d4f4b4e1f17e256f909a Mon Sep 17 00:00:00 2001 From: Alex Gherghisan Date: Fri, 15 Dec 2023 15:49:52 +0000 Subject: [PATCH] fix: docker user permissions (#3711) This PR sets uid/gid when running our Docker containers so that any files they touch/create will be editable by the host's user. It also restores the `/cache` volume on mac so that subsequent compilations use prior cached archives. --------- Co-authored-by: Charlie Lye --- yarn-project/cli/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yarn-project/cli/Dockerfile b/yarn-project/cli/Dockerfile index dc70ce119ca..21dfcc65e97 100644 --- a/yarn-project/cli/Dockerfile +++ b/yarn-project/cli/Dockerfile @@ -3,4 +3,8 @@ ENTRYPOINT ["node", "--no-warnings", "/usr/src/yarn-project/cli/dest/bin/index.j # The version has been updated in yarn-project-prod. # Adding COMMIT_TAG here to rebuild versioned image. -ARG COMMIT_TAG="" \ No newline at end of file +ARG COMMIT_TAG="" + +RUN mkdir /cache && chmod 777 /cache +ENV XDG_CACHE_HOME /cache +VOLUME "/cache"