Skip to content

Commit

Permalink
Slim and alpine dependency updates in base ruby images
Browse files Browse the repository at this point in the history
  • Loading branch information
rubys committed Jan 14, 2025
1 parent da650c7 commit c031e0e
Show file tree
Hide file tree
Showing 40 changed files with 41 additions and 40 deletions.
3 changes: 2 additions & 1 deletion lib/generators/dockerfile_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class DockerfileGenerator < Rails::Generators::Base
"libtiff-dev" => "tiff-dev",
"libjemalloc2" => "jemalloc",
"libvips" => "vips-dev",
"libyaml-dev" => "yaml-dev",
"node-gyp" => "gyp",
"pkg-config" => "pkgconfig",
"python" => "python3",
Expand Down Expand Up @@ -737,7 +738,7 @@ def base_requirements

def build_packages
# start with the essentials
packages = %w(build-essential)
packages = %w(build-essential libyaml-dev)
packages += @@packages["build"] if @@packages["build"]
packages += %w(nodejs npm) if (node_version == "lts") && (not using_execjs?)
packages << "libyaml-dev" if options.fullstaq?
Expand Down
2 changes: 1 addition & 1 deletion test/results/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems and node modules
RUN apk update && \
apk add build-base gyp libpq-dev pkgconfig python3 && \
apk add build-base gyp libpq-dev pkgconfig python3 yaml-dev && \
rm -rf /var/cache/apk/*

# Install JavaScript dependencies
Expand Down
2 changes: 1 addition & 1 deletion test/results/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/bin_cd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/bun/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config unzip && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config unzip && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install Bun
Expand Down
2 changes: 1 addition & 1 deletion test/results/cache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ FROM base AS build
RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt \
--mount=type=cache,id=dev-apt-lib,sharing=locked,target=/var/lib/apt \
apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3
apt-get install --no-install-recommends -y build-essential libyaml-dev node-gyp pkg-config python-is-python3

# Install JavaScript dependencies
ARG NODE_VERSION=xxx
Expand Down
2 changes: 1 addition & 1 deletion test/results/ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/env/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Build options
Expand Down
2 changes: 1 addition & 1 deletion test/results/esbuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ 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 node-gyp pkg-config python-is-python3 && \
apt-get install --no-install-recommends -y build-essential libyaml-dev node-gyp pkg-config python-is-python3 && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install JavaScript dependencies
Expand Down
2 changes: 1 addition & 1 deletion test/results/execjs_importmap/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Build options
Expand Down
2 changes: 1 addition & 1 deletion test/results/execjs_node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ 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 node-gyp pkg-config python-is-python3 && \
apt-get install --no-install-recommends -y build-essential libyaml-dev node-gyp pkg-config python-is-python3 && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install yarn
Expand Down
2 changes: 1 addition & 1 deletion test/results/grover/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ 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 node-gyp pkg-config python-is-python3 && \
apt-get install --no-install-recommends -y build-essential libyaml-dev node-gyp pkg-config python-is-python3 && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Build options
Expand Down
2 changes: 1 addition & 1 deletion test/results/idle/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/jemalloc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/label/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/litefs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/litestream/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/minimal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/mysql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential default-libmysqlclient-dev && \
apt-get install --no-install-recommends -y build-essential default-libmysqlclient-dev libyaml-dev && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/no_precompiled_gems/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/no_prep/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/parallel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS prebuild

# Install packages needed to build gems and node modules
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3 && \
apt-get install --no-install-recommends -y build-essential libyaml-dev node-gyp pkg-config python-is-python3 && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives


Expand Down
2 changes: 1 addition & 1 deletion test/results/postgresql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential libpq-dev && \
apt-get install --no-install-recommends -y build-essential libpq-dev libyaml-dev && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/precompile_defer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV BUNDLE_DEPLOYMENT="1" \

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/private_gemserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/private_gemserver_with_cache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ FROM base AS build
RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt \
--mount=type=cache,id=dev-apt-lib,sharing=locked,target=/var/lib/apt \
apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config

# Install application gems
COPY Gemfile Gemfile.lock ./
Expand Down
2 changes: 1 addition & 1 deletion test/results/redis/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/rmagick/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential libmagickwand-dev pkg-config && \
apt-get install --no-install-recommends -y build-essential libmagickwand-dev libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/shrine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/sidekiq/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential libpq-dev && \
apt-get install --no-install-recommends -y build-essential libpq-dev libyaml-dev && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/solid_queue_postgres/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential libpq-dev && \
apt-get install --no-install-recommends -y build-essential libpq-dev libyaml-dev && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/solid_queue_sqlite3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/sqlite3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/swap/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/thruster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/trilogy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/vite/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ 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 node-gyp pkg-config python-is-python3 && \
apt-get install --no-install-recommends -y build-essential libyaml-dev node-gyp pkg-config python-is-python3 && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install Node.js
Expand Down
2 changes: 1 addition & 1 deletion test/results/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down
2 changes: 1 addition & 1 deletion test/results/yjit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FROM base AS build

# Install packages needed to build gems
RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config && \
apt-get install --no-install-recommends -y build-essential libyaml-dev pkg-config && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives

# Install application gems
Expand Down

0 comments on commit c031e0e

Please sign in to comment.