File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -88,15 +88,17 @@ RUN wget --version
88
88
# Add user "nvm" as non-root user
89
89
RUN useradd -ms /bin/bash nvm
90
90
91
+ # Copy and set permission for nvm directory
92
+ COPY . /home/nvm/.nvm/
93
+ RUN chown nvm:nvm -R "home/nvm/.nvm"
94
+
91
95
# Set sudoer for "nvm"
92
96
RUN echo 'nvm ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
93
97
94
98
# Switch to user "nvm" from now
95
99
USER nvm
96
100
97
101
# nvm
98
- COPY . /home/nvm/.nvm/
99
- RUN sudo chown nvm:nvm -R "$HOME/.nvm"
100
102
RUN echo 'export NVM_DIR="$HOME/.nvm"' >> "$HOME/.bashrc"
101
103
RUN echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> "$HOME/.bashrc"
102
104
RUN echo '[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> "$HOME/.bashrc"
You can’t perform that action at this time.
0 commit comments