Last active
October 9, 2019 09:58
-
-
Save edtoken/c4e8b79d825c3049d4e9c37f8c018d18 to your computer and use it in GitHub Desktop.
Setup NVM in the docker Container
This file contains hidden or 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
FROM node:8 | |
RUN apt-get update && apt-get install -y -q --no-install-recommends \ | |
apt-transport-https \ | |
build-essential \ | |
ca-certificates \ | |
curl \ | |
git \ | |
libssl-dev \ | |
wget \ | |
gconf-service \ | |
libasound2 \ | |
libatk1.0-0 \ | |
libatk-bridge2.0-0 \ | |
libc6 \ | |
libcairo2 \ | |
libcups2 \ | |
libdbus-1-3 \ | |
libexpat1 \ | |
libfontconfig1 \ | |
libgcc1 \ | |
libgconf-2-4 \ | |
libgdk-pixbuf2.0-0 \ | |
libglib2.0-0 \ | |
libgtk-3-0 \ | |
libnspr4 \ | |
libpango-1.0-0 \ | |
libpangocairo-1.0-0 \ | |
libstdc++6 \ | |
libx11-6 \ | |
libx11-xcb1 \ | |
libxcb1 \ | |
libxcomposite1 \ | |
libxcursor1 \ | |
libxdamage1 \ | |
libxext6 \ | |
libxfixes3 \ | |
libxi6 \ | |
libxrandr2 \ | |
libxrender1 \ | |
libxss1 \ | |
libxtst6 \ | |
ca-certificates \ | |
fonts-liberation \ | |
libappindicator1 \ | |
libnss3 \ | |
lsb-release \ | |
xdg-utils \ | |
wget | |
WORKDIR /app | |
ENV NVM_DIR /usr/local/nvm | |
ENV NODE_VERSION v10.16.3 | |
RUN mkdir $NVM_DIR | |
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash | |
RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm alias default $NODE_VERSION && nvm use default" | |
ENV NODE_PATH $NVM_DIR/versions/node/$NODE_VERSION/lib/node_modules | |
ENV PATH $NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH | |
RUN node --version | |
RUN npm --version | |
RUN yarn --version | |
COPY "*.json" ./ | |
COPY yarn.lock ./ | |
RUN yarn | |
COPY . . | |
RUN yarn test:e2e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment