-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
38 lines (28 loc) · 977 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
29
30
31
32
33
34
35
36
37
38
FROM ruby:2.7.8
# Install apt-transport-https
RUN apt-get update
RUN apt-get install -y apt-transport-https
# Add NodeJS repo
RUN curl -sS https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
RUN echo "deb https://deb.nodesource.com/node_8.x stretch main" > /etc/apt/sources.list.d/node.list
# Add Yarn repo
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
# Install packages
RUN apt-get update
RUN apt-get install -y nodejs yarn postgresql-client nano vim
# Clean up
RUN apt-get -q clean
RUN rm -rf /var/lib/apt/lists
WORKDIR /usr/src/app
ENV DISABLE_SPRING 1
# Install Ruby dependencies
COPY Gemfile* ./
RUN gem install bundler
RUN bundle install --jobs 20 --retry 5
# Install JavaScript dependencies
COPY yarn.lock ./
RUN yarn install
RUN yarn check --integrity
ENTRYPOINT ["bundle", "exec"]
CMD ["rails", "server", "-b", "0.0.0.0"]