Fix file permissions

This commit is contained in:
Manuel Thalmann 2022-03-23 10:12:25 +00:00
parent 04ee84d77e
commit a2b7531ad4
2 changed files with 6 additions and 1 deletions

View file

@ -2,3 +2,5 @@
echo '* text=auto eol=lf' > $(git rev-parse --git-dir)/info/attributes echo '* text=auto eol=lf' > $(git rev-parse --git-dir)/info/attributes
sudo rm -rf /var/www/html sudo rm -rf /var/www/html
sudo ln -sT $(pwd)/test/website /var/www/html sudo ln -sT $(pwd)/test/website /var/www/html
sudo chown vscode:vscode node_modules
sudo chown vscode:vscode vendor

View file

@ -4,7 +4,10 @@ RUN apt-get update && \
apt-get -y install sudo && \ apt-get -y install sudo && \
rm -rf /var/lib/apt/lists/* 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/^%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/g' && \
sed -i /etc/sudoers -re 's/^root.*/root 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 echo 'vscode ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
USER vscode