forked from rootux/midburnerot-dreams
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
28 lines (22 loc) · 845 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 on ruby-2.3.1 minimal image
FROM ruby:2.3.1-slim
# Install dependencies
# build-essential: Needed for many gems
# postgresql-client: used DB
# git: needed for bundle for some gems
# libpq-dev: pg gem (postgres gem)
# imagemagick libmagickcore-dev libmagickwand-dev: for rmagick gem
# libsqlite3-dev: for sqlite3 gem
# nodejs: for uglifier gem (js compression)
RUN apt-get -y update && apt-get -y install postgresql-client-9.4 build-essential \
git libpq-dev imagemagick libmagickcore-dev libmagickwand-dev \
libsqlite3-dev nodejs
ENV PROJECT_PATH /dreams
RUN mkdir -p $PROJECT_PATH
WORKDIR $PROJECT_PATH
# First copy dependencies to not recreate unnecessary layers
COPY Gemfile Gemfile
COPY Gemfile.lock Gemfile.lock
RUN bundle install
COPY . .
CMD bundle exec rake db:migrate && bundle exec puma -C config/puma.rb