forked from forem/forem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (24 loc) · 847 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
FROM ruby:2.5.3
# Make nodejs and yarn as dependencies
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# Install dependencies and perform clean-up
RUN apt-get update -qq && apt-get install -y \
build-essential \
nodejs \
yarn \
&& apt-get -q clean \
&& rm -rf /var/lib/apt/lists
WORKDIR /usr/src/app
ENV RAILS_ENV development
# Installing Ruby dependencies
COPY Gemfile* ./
RUN gem install bundler
RUN bundle install --jobs 20 --retry 5
# Install JavaScript dependencies
COPY yarn.lock ./
ENV YARN_INTEGRITY_ENABLED "false"
RUN yarn install && yarn check --integrity
ENTRYPOINT ["bundle", "exec"]
CMD ["rails", "server", "-b", "0.0.0.0", "-p", "3000"]