Merge pull request #1861 from PeterDaveHello/ImproveDockerfile
Improve and update Dockerfile
commit
17c33fd9ae
18
Dockerfile
18
Dockerfile
|
@ -8,14 +8,16 @@
|
||||||
|
|
||||||
# Use Ubuntu Trusty Tahr as base image as we're using on Travis CI
|
# 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!
|
# I also tested with Ubuntu 16.04, should be good with it!
|
||||||
From ubuntu:14.04
|
FROM ubuntu:14.04
|
||||||
MAINTAINER Peter Dave Hello <hsu@peterdavehello.org>
|
LABEL maintainer="Peter Dave Hello <hsu@peterdavehello.org>"
|
||||||
|
LABEL name="nvm-dev-env"
|
||||||
|
LABEL version="latest"
|
||||||
|
|
||||||
# Prevent dialog during apt install
|
# Prevent dialog during apt install
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
# ShellCheck version
|
# ShellCheck version
|
||||||
ENV SHELLCHECK_VERSION=0.4.7
|
ENV SHELLCHECK_VERSION=0.5.0
|
||||||
|
|
||||||
# Pick a Ubuntu apt mirror site for better speed
|
# Pick a Ubuntu apt mirror site for better speed
|
||||||
# ref: https://launchpad.net/ubuntu/+archivemirrors
|
# ref: https://launchpad.net/ubuntu/+archivemirrors
|
||||||
|
@ -91,10 +93,10 @@ USER nvm
|
||||||
|
|
||||||
# nvm
|
# nvm
|
||||||
COPY . /home/nvm/.nvm/
|
COPY . /home/nvm/.nvm/
|
||||||
RUN sudo chown nvm:nvm -R $HOME/.nvm
|
RUN sudo chown nvm:nvm -R "$HOME/.nvm"
|
||||||
RUN echo 'export NVM_DIR="$HOME/.nvm"' >> $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/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 '[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> "$HOME/.bashrc"
|
||||||
|
|
||||||
# nodejs and tools
|
# nodejs and tools
|
||||||
RUN bash -c 'source $HOME/.nvm/nvm.sh && \
|
RUN bash -c 'source $HOME/.nvm/nvm.sh && \
|
||||||
|
@ -105,4 +107,4 @@ RUN bash -c 'source $HOME/.nvm/nvm.sh && \
|
||||||
# Set WORKDIR to nvm directory
|
# Set WORKDIR to nvm directory
|
||||||
WORKDIR /home/nvm/.nvm
|
WORKDIR /home/nvm/.nvm
|
||||||
|
|
||||||
ENTRYPOINT /bin/bash
|
ENTRYPOINT ["/bin/bash"]
|
||||||
|
|
Loading…
Reference in New Issue