Skip to content
Myr

Merge pull request #1861 from PeterDaveHello/ImproveDockerfile

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Improve and update Dockerfile

authored by Jordan Harband · committed by GitHub · parents 41dc421, 04b35b5 · Browse files · 1 file+10 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−8 removed

  • other:+10 added−8 removed

1 file+10 added−8 removed

modified:Dockerfile+10 added-8 removed
6 unmodified lines
7# build this image, it depends on your hardware.89# Use Ubuntu Trusty Tahr as base image as we're using on Travis CI10# I also tested with Ubuntu 16.04, should be good with it!11From ubuntu:14.0412MAINTAINER Peter Dave Hello <hsu@peterdavehello.org>11FROM ubuntu:14.0412LABEL maintainer="Peter Dave Hello <hsu@peterdavehello.org>"13LABEL name="nvm-dev-env"14LABEL version="latest"1516# Prevent dialog during apt install17ENV DEBIAN_FRONTEND noninteractive1819# ShellCheck version18ENV SHELLCHECK_VERSION=0.4.720ENV SHELLCHECK_VERSION=0.5.02122# Pick a Ubuntu apt mirror site for better speed23# ref: https://launchpad.net/ubuntu/+archivemirrors24ENV UBUNTU_APT_SITE ubuntu.cs.utah.edu
67 unmodified lines
92USER nvm9394# nvm95COPY . /home/nvm/.nvm/94RUN sudo chown nvm:nvm -R $HOME/.nvm95RUN echo 'export NVM_DIR="$HOME/.nvm"' >> $HOME/.bashrc96RUN echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> $HOME/.bashrc97RUN echo '[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> $HOME/.bashrc96RUN sudo chown nvm:nvm -R "$HOME/.nvm"97RUN echo 'export NVM_DIR="$HOME/.nvm"' >> "$HOME/.bashrc"98RUN echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> "$HOME/.bashrc"99RUN echo '[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> "$HOME/.bashrc"100101# nodejs and tools102RUN bash -c 'source $HOME/.nvm/nvm.sh && \103 nvm install node && \
2 unmodified lines
106107# Set WORKDIR to nvm directory108WORKDIR /home/nvm/.nvm109108ENTRYPOINT /bin/bash110ENTRYPOINT ["/bin/bash"]