Skip to content

Commit 5d61ea0

Browse files
committed
Refactor Dockerfile to remove duplicate code and fix permissions
1 parent 3d79bc6 commit 5d61ea0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Framework/angular/v18/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ chmod -R u+rw /home/devbox/project && \
1212
chmod -R +x /home/devbox/project/entrypoint.sh
1313

1414
USER devbox
15-
RUN cd /home/devbox/project && \
15+
ENV PATH=/home/devbox/.npm-global/bin:$PATH
16+
17+
RUN mkdir -p /home/devbox/.npm-global && \
18+
npm config set prefix '/home/devbox/.npm-global' && \
19+
cd /home/devbox/project && \
1620
npm install -g serve && \
1721
npm run build
1822

0 commit comments

Comments
 (0)