From 9e8b85ff61cf4c62c7799d83f51fb9d465b79307 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Tue, 14 Jan 2025 11:58:03 +0000 Subject: [PATCH] Normalize docker dependencies Use Debian Bookworm/Ubuntu 24.04 and Ruby 3.4.1 everywhere. --- .github/workflows/build.yml | 2 +- .github/workflows/testing.yml | 2 +- Dockerfile.production | 7 +++---- bops-applicants | 2 +- docker/dnsmasq/Dockerfile | 2 +- docker/postgis/Dockerfile | 2 +- docker/ruby/Dockerfile | 4 ++-- 7 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17747486c7..a47b3da0af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,7 @@ concurrency: jobs: linters: name: Linters - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 strategy: matrix: task: diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 3d29045e40..c974c11f4e 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -44,7 +44,7 @@ on: jobs: tests: name: ${{ inputs.name }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 env: PUPPETEER_SKIP_DOWNLOAD: true diff --git a/Dockerfile.production b/Dockerfile.production index aba449ea63..63f7510d73 100644 --- a/Dockerfile.production +++ b/Dockerfile.production @@ -2,7 +2,7 @@ # Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile ARG RUBY_VERSION=3.4.1 -FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base +FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim-bookworm AS base # Rails app lives here WORKDIR /rails @@ -15,11 +15,11 @@ ENV RAILS_ENV="production" \ # Throw-away build stage to reduce size of final image -FROM base as build +FROM base AS build # Install packages needed to build gems and node modules RUN apt-get update -qq && \ - apt-get install --no-install-recommends -y build-essential curl git libpq-dev libvips node-gyp pkg-config python-is-python3 + apt-get install --no-install-recommends -y build-essential curl git libpq-dev libyaml-dev libvips node-gyp pkg-config python-is-python3 # Install JavaScript dependencies ARG NODE_VERSION=20.11.0 @@ -99,7 +99,6 @@ ARG DATABASE_URL=postgres://localhost:5432/bops_web ARG RAILS_LOG_TO_STDOUT=true ARG RAILS_SERVE_STATIC_FILES=true ARG PORT=80 -ARG SECRET_KEY_BASE=notasecret # Start the server by default, this can be overwritten at runtime EXPOSE 3000 diff --git a/bops-applicants b/bops-applicants index 4555819af5..2baa359a9e 160000 --- a/bops-applicants +++ b/bops-applicants @@ -1 +1 @@ -Subproject commit 4555819af52f3828458e841bf15c5674fe0bb82a +Subproject commit 2baa359a9ef31a0a72d244b3eeffe44279b5d03d diff --git a/docker/dnsmasq/Dockerfile b/docker/dnsmasq/Dockerfile index 9d55a35305..cea6537170 100644 --- a/docker/dnsmasq/Dockerfile +++ b/docker/dnsmasq/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bullseye-slim +FROM debian:bookworm-slim # Run security updates and install packages RUN bash -c "export DEBIAN_FRONTEND=noninteractive && \ diff --git a/docker/postgis/Dockerfile b/docker/postgis/Dockerfile index dfff7859fa..93a71bebab 100644 --- a/docker/postgis/Dockerfile +++ b/docker/postgis/Dockerfile @@ -1,4 +1,4 @@ -FROM postgres:14-bullseye +FROM postgres:14-bookworm ENV POSTGIS_MAJOR 3 diff --git a/docker/ruby/Dockerfile b/docker/ruby/Dockerfile index 4d0f37eefb..6bb8bb3c6c 100644 --- a/docker/ruby/Dockerfile +++ b/docker/ruby/Dockerfile @@ -1,6 +1,6 @@ ARG RUBY_VERSION=3.4.1 -FROM ruby:$RUBY_VERSION-bullseye +FROM ruby:$RUBY_VERSION-bookworm ENV BUNDLE_PATH=/home/rails/bundle @@ -15,7 +15,7 @@ RUN bash -c "export DEBIAN_FRONTEND=noninteractive && \ RUN bash -c "apt-get install -y --no-install-recommends libvips-dev poppler-utils" # Install PostgreSQL client -RUN bash -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main' \ +RUN bash -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main' \ > /etc/apt/sources.list.d/pgdg.list && \ wget -q -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc \ | apt-key add - && apt-get update && \