feat: switch to using official ruby slim image
Update the Dockerfile to use the official ruby slim image, rather than a custom image. This reduces the Docker image size and improves build times. - Update the base build and development images to use the official ruby slim image - Remove redundant arguments in the build and development stages Using the official ruby slim image simplifies the build process and reduces the image size, resulting in faster build times and a more maintainable Dockerfile.
This commit is contained in:
parent
378530cc1b
commit
2c72e96977
@ -10,8 +10,7 @@
|
|||||||
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
|
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
|
||||||
# ARG RUBY_VERSION=3.3.5
|
# ARG RUBY_VERSION=3.3.5
|
||||||
# FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base
|
# FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base
|
||||||
ARG BASE_IMAGE=docker.io/songtianlun/today_ai_weather:base_main
|
FROM docker.io/songtianlun/today_ai_weather:base_main AS base
|
||||||
FROM ${BASE_IMAGE} AS base
|
|
||||||
|
|
||||||
# Rails app lives here
|
# Rails app lives here
|
||||||
WORKDIR /rails
|
WORKDIR /rails
|
||||||
@ -27,8 +26,7 @@ ENV RAILS_ENV="production" \
|
|||||||
|
|
||||||
# Throw-away build stage to reduce size of final image
|
# Throw-away build stage to reduce size of final image
|
||||||
# FROM base AS build
|
# FROM base AS build
|
||||||
ARG DEVEl_IMAGE=docker.io/songtianlun/today_ai_weather:devel_main
|
FROM docker.io/songtianlun/today_ai_weather:devel_main AS build
|
||||||
FROM ${DEVEL_IMAGE} AS build
|
|
||||||
|
|
||||||
# Install packages needed to build gems and node modules
|
# Install packages needed to build gems and node modules
|
||||||
# Install JavaScript dependencies
|
# Install JavaScript dependencies
|
||||||
|
Loading…
Reference in New Issue
Block a user