Created
July 20, 2020 13:52
-
-
Save ctrlaltdylan/07dd0ef7c665cc76e347bed7db10795d to your computer and use it in GitHub Desktop.
Ruby image with node & yarn
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 ruby:2.6-slim | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
build-essential \ | |
curl \ | |
gnupg \ | |
git \ | |
# substitute 12.x with whichever Node version you require: | |
&& curl -sL https://deb.nodesource.com/setup_12.x | bash - \ | |
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ | |
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ | |
&& apt-get update && apt-get install -y --no-install-recommends \ | |
nodejs \ | |
yarn \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN mkdir /app | |
WORKDIR /app | |
ADD package.json /app/package.json | |
ADD yarn.lock /app/yarn.lock | |
RUN yarn --pure-lockfile | |
ADD Gemfile /app/Gemfile | |
ADD Gemfile.lock /app/Gemfile.lock | |
RUN bundle install --jobs 4 | |
ADD . /app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment