-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (24 loc) · 840 Bytes
/
Dockerfile
File metadata and controls
36 lines (24 loc) · 840 Bytes
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
FROM ruby:2.3.1
# Install essential linux packages
RUN apt-get update -qq && apt-get install -y --no-install-recommends \
bash \
build-essential \
libpq-dev \
nodejs \
npm \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
# Define where the application will live inside the image
ENV RAILS_ROOT /var/www/app
# Create application home. App server will need the pids dir
RUN mkdir -p $RAILS_ROOT/tmp/pids
# Set our working directory inside the image
WORKDIR $RAILS_ROOT
# Install bundler
RUN gem install bundler
# Use the Gemfiles as Docker cache markers and run bundle install before copy over app src
#COPY Gemfile Gemfile
#COPY Gemfile.lock Gemfile.lock
#RUN bundle install --deployment
#RUN rails db:migrate
CMD bundle install --deployment && rails db:migrate && rails s