mirror of
https://github.com/usatiuk/writer.git
synced 2025-10-29 00:17:48 +01:00
docker thing
This commit is contained in:
@@ -2,14 +2,16 @@
|
||||
ARG VARIANT="14-buster"
|
||||
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}
|
||||
|
||||
ENV DOCKERDEV=true
|
||||
|
||||
# Update args in docker-compose.yaml to set the UID/GID of the "node" user.
|
||||
ARG USER_UID=1000
|
||||
ARG USER_GID=$USER_UID
|
||||
RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
|
||||
groupmod --gid $USER_GID node \
|
||||
&& usermod --uid $USER_UID --gid $USER_GID node \
|
||||
&& chmod -R $USER_UID:$USER_GID /home/node \
|
||||
&& chmod -R $USER_UID:root /usr/local/share/nvm /usr/local/share/npm-global; \
|
||||
groupmod --gid $USER_GID node \
|
||||
&& usermod --uid $USER_UID --gid $USER_GID node \
|
||||
&& chmod -R $USER_UID:$USER_GID /home/node \
|
||||
&& chmod -R $USER_UID:root /usr/local/share/nvm /usr/local/share/npm-global; \
|
||||
fi
|
||||
|
||||
RUN sudo -u node npm config set unsafe-perm=true
|
||||
|
||||
Reference in New Issue
Block a user