]> git.openstreetmap.org Git - rails.git/blob - Dockerfile
Switch to using vips for image processing
[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       libvips-dev \
21       libxml2-dev \
22       libxslt1-dev \
23       locales \
24       nodejs \
25       postgresql-client \
26       ruby2.7 \
27       ruby2.7-dev \
28       tzdata \
29       unzip \
30       yarnpkg \
31  && apt-get clean \
32  && rm -rf /var/lib/apt/lists/*
33
34 # Install compatible Osmosis to help users import sample data in a new instance
35 RUN curl -OL https://github.com/openstreetmap/osmosis/releases/download/0.47.2/osmosis-0.47.2.tgz \
36  && tar -C /usr/local -xzf osmosis-0.47.2.tgz
37
38 ENV DEBIAN_FRONTEND=dialog
39
40 # Setup app location
41 RUN mkdir -p /app
42 WORKDIR /app
43
44 # Install Ruby packages
45 ADD Gemfile Gemfile.lock /app/
46 RUN gem install bundler \
47  && bundle install
48
49 # Install NodeJS packages using yarnpkg
50 # `bundle exec rake yarn:install` will not work
51 ADD package.json yarn.lock /app/
52 RUN yarnpkg --ignore-engines install