Skip to content
This repository has been archived by the owner on Apr 14, 2018. It is now read-only.

Commit

Permalink
Set npm prefix for global installs
Browse files Browse the repository at this point in the history
Needed because we now run as a non-root user under docker.
Fixes #7
  • Loading branch information
alexeagle committed Jan 5, 2018
1 parent 6e6ac08 commit 2109310
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,11 @@ RUN git clone https://github.com/bazelbuild/bazel.git \

USER circleci

ENTRYPOINT ["/bin/bash"]
###
# Fix up npm global installation
# See https://docs.npmjs.com/getting-started/fixing-npm-permissions
RUN mkdir ~/.npm-global \
&& npm config set prefix '~/.npm-global' \
&& echo "export PATH=~/.npm-global/bin:$PATH" >> ~/.profile

ENTRYPOINT ["/bin/bash", "--login"]

0 comments on commit 2109310

Please sign in to comment.