Skip to content

Instantly share code, notes, and snippets.

Created September 29, 2014 00:16
Show Gist options
  • Save anonymous/cce9c5a61d690d67475b to your computer and use it in GitHub Desktop.
Save anonymous/cce9c5a61d690d67475b to your computer and use it in GitHub Desktop.
FROM debian:wheezy
ENV INSTALL /root
ENV NODE_VER v0.10.32
ENV MANPATH /share/man #shut up nvm
ENV NVM_DIR /usr/local/nvm
RUN apt-get update
RUN apt-get install -y bash git curl
# this style is preferred to complex shell in Dockerfiles
ADD ./node_install.sh /node_install.sh
RUN /node_install.sh
#!/bin/bash
# see that the environment vars got populated correctly
env
#
curl https://raw.githubusercontent.com/creationix/nvm/v0.17.1/install.sh | bash
chmod +x /usr/local/nvm/nvm.sh
# local nvm setup jiggery-pokery
$NVM_DIR/nvm.sh
# nvm injects commands in our .bashrc file (we are root)
source /root/.bashrc
echo "=> running $NVM_DIR/nvm.sh install $NODE_VER..."
nvm install $NODE_VER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment