Skip to content

Slim and alpine dependency updates in base ruby images #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions 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,10 +738,10 @@ 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?
packages << "libffi-dev" if @@packages["ffi"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should have been @gemfile.include?("ffi")

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Fixed in #132


# add databases: sqlite3, postgres, mysql
packages << "pkg-config" if options.sqlite3? || @sqlite3
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
Loading