]> git.openstreetmap.org Git - rails.git/blob - Dockerfile
Update minimum ruby version to 3.0
[rails.git] / Dockerfile
1 FROM ubuntu:22.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       libarchive-dev \
13       libffi-dev \
14       libgd-dev \
15       libpq-dev \
16       libsasl2-dev \
17       libvips-dev \
18       libxml2-dev \
19       libxslt1-dev \
20       locales \
21       nodejs \
22       postgresql-client \
23       ruby3.0 \
24       ruby3.0-dev \
25       tzdata \
26       unzip \
27       yarnpkg \
28  && apt-get clean \
29  && rm -rf /var/lib/apt/lists/*
30
31 # Install compatible Osmosis to help users import sample data in a new instance
32 RUN curl -OL https://github.com/openstreetmap/osmosis/releases/download/0.47.2/osmosis-0.47.2.tgz \
33  && tar -C /usr/local -xzf osmosis-0.47.2.tgz
34
35 ENV DEBIAN_FRONTEND=dialog
36
37 # Setup app location
38 RUN mkdir -p /app
39 WORKDIR /app
40
41 # Install Ruby packages
42 ADD Gemfile Gemfile.lock /app/
43 RUN gem install bundler \
44  && bundle install
45
46 # Install NodeJS packages using yarn
47 ADD package.json yarn.lock /app/
48 ADD bin/yarn /app/bin/
49 RUN bundle exec bin/yarn install