Skip to content

Commit

Permalink
Merge pull request #148 from fly-apps/match-rails-dockerfiles
Browse files Browse the repository at this point in the history
expand check to match Rails generated Dockerfiles
  • Loading branch information
rubys authored Feb 25, 2025
2 parents 8449fc5 + b6c3b3c commit 499267a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/generators/dockerfile_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,8 @@ def generate_app
# Older versions no longer release new images
matching_ruby = [">= 3.4.2", "~> 3.3.7", "~> 3.2.7", "~> 3.1.7"].any? { |v| Gem::Requirement.new(v).satisfied_by?(Gem.ruby_version) }
# Only slim and alpine are missing libyaml-dev/yaml-dev
matching_image = /FROM ruby:.+-(alpine|slim)/i.match?(dockerfile)
# https://rubular.com/r/Jb4LEfrMSmxkp9
matching_image = /FROM (.*\/)?ruby:(.+-)?(alpine|slim)/i.match?(dockerfile)
if !matching_ruby || !matching_image
missing.delete("libyaml-dev")
missing.delete("yaml-dev")
Expand Down

0 comments on commit 499267a

Please sign in to comment.