-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add-info-to-readme
- Loading branch information
Showing
144 changed files
with
3,468 additions
and
973 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,3 @@ npm-debug.log | |
|
||
.DS_Store | ||
current | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
root = true | ||
|
||
[*] | ||
tab_width = 2 | ||
indent_size = 2 | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.txt] | ||
indent_size = false | ||
|
||
[test/fast/Listing versions/Running "nvm ls" calls into nvm_alias] | ||
indent_size = false | ||
|
||
[test/fast/Listing versions/Running "nvm ls --no-alias" does not call into nvm_alias] | ||
indent_size = false | ||
|
||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
* eol=lf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,14 +8,19 @@ | |
|
||
# Use Ubuntu Trusty Tahr as base image as we're using on Travis CI | ||
# I also tested with Ubuntu 16.04, should be good with it! | ||
From ubuntu:14.04 | ||
MAINTAINER Peter Dave Hello <[email protected]> | ||
FROM ubuntu:14.04 | ||
LABEL maintainer="Peter Dave Hello <[email protected]>" | ||
LABEL name="nvm-dev-env" | ||
LABEL version="latest" | ||
|
||
# Set the SHELL to bash with pipefail option | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
||
# Prevent dialog during apt install | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# ShellCheck version | ||
ENV SHELLCHECK_VERSION=0.4.7 | ||
ENV SHELLCHECK_VERSION=0.5.0 | ||
|
||
# Pick a Ubuntu apt mirror site for better speed | ||
# ref: https://launchpad.net/ubuntu/+archivemirrors | ||
|
@@ -24,7 +29,7 @@ ENV UBUNTU_APT_SITE ubuntu.cs.utah.edu | |
# Disable src package source | ||
RUN sed -i 's/^deb-src\ /\#deb-src\ /g' /etc/apt/sources.list | ||
|
||
# Replace origin apt pacakge site with the mirror site | ||
# Replace origin apt package site with the mirror site | ||
RUN sed -E -i "s/([a-z]+.)?archive.ubuntu.com/$UBUNTU_APT_SITE/g" /etc/apt/sources.list | ||
RUN sed -i "s/security.ubuntu.com/$UBUNTU_APT_SITE/g" /etc/apt/sources.list | ||
|
||
|
@@ -83,27 +88,28 @@ RUN wget --version | |
# Add user "nvm" as non-root user | ||
RUN useradd -ms /bin/bash nvm | ||
|
||
# Copy and set permission for nvm directory | ||
COPY . /home/nvm/.nvm/ | ||
RUN chown nvm:nvm -R "home/nvm/.nvm" | ||
|
||
# Set sudoer for "nvm" | ||
RUN echo 'nvm ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers | ||
|
||
# Switch to user "nvm" from now | ||
USER nvm | ||
|
||
# nvm | ||
COPY . /home/nvm/.nvm/ | ||
RUN sudo chown nvm:nvm -R $HOME/.nvm | ||
RUN echo 'export NVM_DIR="$HOME/.nvm"' >> $HOME/.bashrc | ||
RUN echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> $HOME/.bashrc | ||
RUN echo '[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> $HOME/.bashrc | ||
RUN echo 'export NVM_DIR="$HOME/.nvm"' >> "$HOME/.bashrc" | ||
RUN echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> "$HOME/.bashrc" | ||
RUN echo '[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> "$HOME/.bashrc" | ||
|
||
# nodejs and tools | ||
RUN bash -c 'source $HOME/.nvm/nvm.sh && \ | ||
nvm install node && \ | ||
npm install -g doctoc urchin && \ | ||
npm install -g doctoc urchin eclint dockerfile_lint && \ | ||
npm install --prefix "$HOME/.nvm/"' | ||
|
||
# Set WORKDIR to nvm directory | ||
WORKDIR /home/nvm/.nvm | ||
|
||
ENTRYPOINT /bin/bash | ||
|
||
ENTRYPOINT ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.