Add node default images (#17)

This commit is contained in:
Will O'Beirne 2020-10-23 09:57:53 -05:00 committed by GitHub
parent 29266595cd
commit 1cf52c97fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,15 @@
FROM codercom/enterprise-base:centos
# Run everything as root
USER root
# Install whichever Node version is LTS
RUN curl -sL https://rpm.nodesource.com/setup_lts.x | bash -
RUN yum install -y nodejs
# Install Yarn
RUN curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo
RUN yum install -y yarn
# Set back to coder user
USER coder

View File

@ -0,0 +1,16 @@
FROM codercom/enterprise-base:ubuntu
# Run everything as root
USER root
# Install whichever Node version is LTS
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash -
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y nodejs
# 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 DEBIAN_FRONTEND="noninteractive" apt-get install -y yarn
# Set back to coder user
USER coder