]> git.openstreetmap.org Git - rails.git/blob - Dockerfile
319f77abb7961aabc6cd1c33c07e1caa16c5e1a9
[rails.git] / Dockerfile
1 FROM ruby:2.5
2
3 # Add yarn apt repository
4 # https://classic.yarnpkg.com/en/docs/install#debian-stable
5 RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
6     echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
7
8 # Install system packages
9 RUN apt-get update && \
10     apt-get install --no-install-recommends -y \
11       build-essential \
12       imagemagick \
13       libarchive-dev \
14       libffi-dev \
15       libmagickwand-dev \
16       libpq-dev \
17       libsasl2-dev \
18       libxml2-dev \
19       libxslt1-dev \
20       locales \
21       nodejs \
22       phantomjs \
23       postgresql-client \
24       ruby-dev \
25       yarn && \
26     apt-get clean && \
27     rm -rf /var/lib/apt/lists/*
28
29 # Setup app location
30 RUN mkdir -p /app
31 WORKDIR /app
32
33 # Install Ruby packages
34 ADD Gemfile Gemfile.lock /app/
35 RUN bundle install
36
37 # Install NodeJS packages
38 ADD package.json yarn.lock /app/
39 RUN yarn