Skip to content

Commit 8acdc7f

Browse files
committed
Refactor Dockerfile to install @angular/cli globally, update npm dependencies, and fix build issue
1 parent 3cb0ecf commit 8acdc7f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Framework/react/18.2.0/Dockerfile

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

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

0 commit comments

Comments
 (0)