Skip to content

Commit

Permalink
Normalize docker dependencies
Browse files Browse the repository at this point in the history
Use Debian Bookworm/Ubuntu 24.04 and Ruby 3.4.1 everywhere.
  • Loading branch information
pixeltrix committed Jan 14, 2025
1 parent ac77986 commit 9e8b85f
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
jobs:
linters:
name: Linters
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
strategy:
matrix:
task:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ on:
jobs:
tests:
name: ${{ inputs.name }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
PUPPETEER_SKIP_DOWNLOAD: true

Expand Down
7 changes: 3 additions & 4 deletions Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/dnsmasq/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 && \
Expand Down
2 changes: 1 addition & 1 deletion docker/postgis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgres:14-bullseye
FROM postgres:14-bookworm

ENV POSTGIS_MAJOR 3

Expand Down
4 changes: 2 additions & 2 deletions docker/ruby/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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 && \
Expand Down

0 comments on commit 9e8b85f

Please sign in to comment.