diff --git a/images/web/Dockerfile b/images/web/Dockerfile index bf8b4fed..312c31b3 100644 --- a/images/web/Dockerfile +++ b/images/web/Dockerfile @@ -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 @@ -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/* @@ -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