From 8552cd9600a5fc89dcc9538658079374144e95f7 Mon Sep 17 00:00:00 2001 From: Alex Kriuchykhin Date: Fri, 27 Sep 2024 13:56:32 +0200 Subject: [PATCH] Remove dev packages from production Docker image, update omniauth-saml and nokogiri gems [SCI-11112] (#7896) --- Dockerfile | 2 +- Dockerfile.production | 6 ++++-- Gemfile.lock | 10 +++++----- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5820c945a..da11bb47f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.2.5-bookworm +FROM ruby:3.2-bookworm MAINTAINER SciNote # additional dependecies diff --git a/Dockerfile.production b/Dockerfile.production index 446793d18..2a8af22f0 100644 --- a/Dockerfile.production +++ b/Dockerfile.production @@ -1,5 +1,5 @@ # Building stage -FROM ruby:3.2.5-bookworm AS builder +FROM ruby:3.2-bookworm AS builder RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache RUN \ @@ -41,7 +41,7 @@ RUN \ bash -c "rake assets:precompile && rake deface:precompile && rm -rf ./tmp/cache" # Final stage -FROM ruby:3.2.5-bookworm AS runner +FROM ruby:3.2-bookworm AS runner MAINTAINER SciNote RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache @@ -89,6 +89,8 @@ RUN \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ touch /etc/build-${BUILD_TIMESTAMP} && \ DEBIAN_FRONTEND=noninteractive \ + apt-get remove -y *-dev && \ + apt-get autoremove -y && \ apt-get update -qq && \ apt-get upgrade -y && \ rm -rf /var/lib/apt/lists/* diff --git a/Gemfile.lock b/Gemfile.lock index 1956ae7c2..02710f555 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -466,12 +466,12 @@ GEM net-protocol newrelic_rpm (9.2.2) nio4r (2.7.3) - nokogiri (1.16.5) + nokogiri (1.16.7) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.16.5-arm64-darwin) + nokogiri (1.16.7-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.5-x86_64-linux) + nokogiri (1.16.7-x86_64-linux) racc (~> 1.4) noticed (1.6.3) http (>= 4.0.0) @@ -483,7 +483,7 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - omniauth (2.1.1) + omniauth (2.1.2) hashie (>= 3.4.6) rack (>= 2.2.3) rack-protection @@ -497,7 +497,7 @@ GEM omniauth-rails_csrf_protection (1.0.1) actionpack (>= 4.2) omniauth (~> 2.0) - omniauth-saml (2.1.2) + omniauth-saml (2.2.1) omniauth (~> 2.1) ruby-saml (~> 1.17) omniauth_openid_connect (0.7.1)