From a2b7531ad4ca9cef9270e0b31018156f14f4ac4a Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Wed, 23 Mar 2022 10:12:25 +0000 Subject: [PATCH] Fix file permissions --- .devcontainer/post-create.sh | 2 ++ .devcontainer/web.Dockerfile | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index 4f845eb..fb34cb3 100644 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -2,3 +2,5 @@ echo '* text=auto eol=lf' > $(git rev-parse --git-dir)/info/attributes sudo rm -rf /var/www/html sudo ln -sT $(pwd)/test/website /var/www/html +sudo chown vscode:vscode node_modules +sudo chown vscode:vscode vendor diff --git a/.devcontainer/web.Dockerfile b/.devcontainer/web.Dockerfile index 2d0392a..f7244be 100644 --- a/.devcontainer/web.Dockerfile +++ b/.devcontainer/web.Dockerfile @@ -4,7 +4,10 @@ RUN apt-get update && \ apt-get -y install sudo && \ rm -rf /var/lib/apt/lists/* -RUN adduser --disabled-password --gecos '' vscode && \ +RUN userdel node; \ + adduser --disabled-password --gecos '' vscode && \ sed -i /etc/sudoers -re 's/^%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/g' && \ sed -i /etc/sudoers -re 's/^root.*/root ALL=(ALL:ALL) NOPASSWD: ALL/g' && \ echo 'vscode ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers + +USER vscode