Skip to content

Commit

Permalink
Update Ruby version
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Dec 15, 2023
1 parent 1c74419 commit 197a7e9
Showing 1 changed file with 43 additions and 5 deletions.
48 changes: 43 additions & 5 deletions images/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive
ENV RUBY_MAJOR 3.0
ARG RUBY_VERSION=3.0.6
ENV RUBY_VERSION $RUBY_VERSION
ENV PATH /opt/ruby/bin:$PATH:/opt/rbenv/plugins/ruby-build/bin

# ruby-build
RUN set -ex \
&& mkdir -p /etc/network/interfaces.d \
&& BaseDeps=' \
git \
gcc \
autoconf \
bison \
build-essential \
libssl-dev \
libyaml-dev \
libreadline6-dev \
zlib1g-dev \
libncurses5-dev \
libffi-dev \
libgdbm6 \
libgdbm-dev \
make \
wget \
curl \
iproute2 \
net-tools \
tzdata \
locales \
ca-certificates' \
&& apt-get update \
&& DEBCONF_NOWARNINGS=yes apt-get -y upgrade \
&& DEBCONF_NOWARNINGS=yes DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $BaseDeps \
&& rm -rf /var/lib/apt/lists/* \
&& git clone https://github.com/sstephenson/ruby-build.git /opt/rbenv/plugins/ruby-build \
&& ruby-build ${RUBY_VERSION} /opt/ruby

ENV workdir /var/www

# Production OSM setup
Expand All @@ -8,8 +46,8 @@ ENV RAILS_ENV=production
# Install the openstreetmap-website dependencies
RUN apt-get update \
&& apt-get install -y \
ruby2.7 libruby2.7 ruby2.7-dev libmagickwand-dev libxml2-dev libxslt1-dev \
nodejs npm apache2 apache2-dev build-essential git-core firefox-geckodriver postgresql-client \
libmagickwand-dev libxml2-dev libxslt1-dev \
nodejs npm apache2 apache2-dev build-essential git-core postgresql-client \
libpq-dev libsasl2-dev imagemagick libffi-dev libgd-dev libarchive-dev libbz2-dev yarnpkg curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
Expand Down Expand Up @@ -40,8 +78,8 @@ RUN npm install -g svgo

# Install openstreetmap-website
RUN rm -rf $workdir/html
# GITSHA value at 15-02-2022
ENV OPENSTREETMAP_WEBSITE_GITSHA=c24b5481812aba9e83da1fd855ccb37f92c5d75e

ENV OPENSTREETMAP_WEBSITE_GITSHA=9d717d45417f1cdb971da6f3dd2e9f2ba66ddcfd
RUN curl -L https://github.com/openstreetmap/openstreetmap-website/archive/$OPENSTREETMAP_WEBSITE_GITSHA.zip --output website.zip && unzip website.zip
RUN mv openstreetmap-website-$OPENSTREETMAP_WEBSITE_GITSHA/* $workdir/
WORKDIR $workdir
Expand Down

0 comments on commit 197a7e9

Please sign in to comment.