forked from jerryseigle/nexmo-developer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (21 loc) · 878 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Base image:
FROM ruby:2.7.2
# Install dependencies
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev lsof
# Install modern NodeJS
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
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 -y nodejs yarn
# Set an environment variable where the Rails app is installed to inside of Docker image:
RUN mkdir -p /app/.git/hooks
WORKDIR /app
# Install Node Dependencies
ADD package.json yarn.lock /app/
RUN yarn install
# Update Bundler to Version 2 as ruby:2.5.5 defaults to an older version
RUN gem update --system && gem install bundler
# Install Ruby Dependencies
ADD Gemfile /app/Gemfile
ADD Gemfile.lock /app/Gemfile.lock
RUN bundle install