]> git.openstreetmap.org Git - rails.git/blob - Dockerfile
Drop monkey patch that is no longer needed with rails 6
[rails.git] / Dockerfile
1 FROM ubuntu:20.04
2
3 ENV DEBIAN_FRONTEND=noninteractive
4
5 # Install system packages then clean up to minimize image size
6 RUN apt-get update \
7  && apt-get install --no-install-recommends -y \
8       build-essential \
9       curl \
10       default-jre-headless \
11       file \
12       firefox-geckodriver \
13       imagemagick \
14       libarchive-dev \
15       libffi-dev \
16       libgd-dev \
17       libmagickwand-dev \
18       libpq-dev \
19       libsasl2-dev \
20       libxml2-dev \
21       libxslt1-dev \
22       locales \
23       nodejs \
24       postgresql-client \
25       ruby2.7 \
26       ruby2.7-dev \
27       tzdata \
28       unzip \
29       yarnpkg \
30  && apt-get clean \
31  && rm -rf /var/lib/apt/lists/*
32
33 # Install compatible Osmosis to help users import sample data in a new instance
34 RUN curl -OL https://github.com/openstreetmap/osmosis/releases/download/0.47.2/osmosis-0.47.2.tgz \
35  && tar -C /usr/local -xzf osmosis-0.47.2.tgz
36
37 ENV DEBIAN_FRONTEND=dialog
38
39 # Setup app location
40 RUN mkdir -p /app
41 WORKDIR /app
42
43 # Install Ruby packages
44 ADD Gemfile Gemfile.lock /app/
45 RUN gem install bundler \
46  && bundle install
47
48 # Install NodeJS packages using yarnpkg
49 # `bundle exec rake yarn:install` will not work
50 ADD package.json yarn.lock /app/
51 RUN yarnpkg install