diff --git a/Dockerfile b/Dockerfile index 322fc6d..a2ee105 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ # For a containerized dev environment, see Dev Containers: https://guides.rubyonrails.org/getting_started_with_devcontainer.html # Make sure RUBY_VERSION matches the Ruby version in .ruby-version -ARG RUBY_VERSION=3.4.1 +ARG RUBY_VERSION FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base # Rails app lives here @@ -29,11 +29,11 @@ FROM base AS build # Install packages needed to build gems RUN apt-get update -qq && \ - apt-get install --no-install-recommends -y build-essential git pkg-config && \ + apt-get install --no-install-recommends -y build-essential git pkg-config libyaml-dev && \ rm -rf /var/lib/apt/lists /var/cache/apt/archives # Install application gems -COPY Gemfile Gemfile.lock ./ +COPY Gemfile Gemfile.lock .ruby-version ./ RUN bundle install && \ rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \ bundle exec bootsnap precompile --gemfile