Skip to content

Instantly share code, notes, and snippets.

@mayrop
Created January 13, 2020 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mayrop/e260fda238a1eddd6429f55d147975af to your computer and use it in GitHub Desktop.
Save mayrop/e260fda238a1eddd6429f55d147975af to your computer and use it in GitHub Desktop.
FROM ubuntu:18.04
# Replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
RUN apt-get update --fix-missing
RUN apt-get install -y curl
RUN apt-get install -y build-essential libssl-dev
RUN apt-get install -y git
ENV NVM_DIR /root/.nvm
ENV NODE_VERSION 8.10.0
RUN curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
RUN source $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default
ENV NODE_PATH $NVM_DIR/versions/node/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
RUN npm install -g npm@6.1.0
RUN npm install -g grunt-cli
RUN mkdir /usr/app
RUN mkdir /usr/app/log
WORKDIR /usr/app
# docker build -t mayrop/nvm-8 .
# docker run -it -v $(pwd):/usr/app mayrop/nvm-8 bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment