Last active
July 25, 2019 16:31
-
-
Save sscholle/48550c800ef1be65e61d247782b33b7d to your computer and use it in GitHub Desktop.
Test Node App with Node v10.14.2 with this Dockerfile
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
# CLI: docker run -it -v /somevolume:/var/www some_image bash | |
FROM ubuntu:xenial | |
VOLUME [ "./:/var/www:cached" ] | |
WORKDIR /var/www | |
RUN apt-get update | |
RUN apt-get install --yes curl git zip build-essential | |
RUN curl --silent --location https://deb.nodesource.com/setup_10.x | bash - | |
RUN apt-get install --yes nodejs | |
# use node 10.14.2 | |
RUN npm i -g n | |
RUN n 10.14.2 | |
# install yarn | |
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | |
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | |
RUN apt-get update && apt-get install yarn | |
CMD ["bash"] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment