File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 1
1
ARG RUBY_VERSION=3.3.4
2
2
FROM ghcr.io/rails/devcontainer/images/ruby:$RUBY_VERSION
3
3
4
- RUN apt-get update && apt-get install -y postgresql-client libpq-dev
4
+ RUN apt-get update -qq \
5
+ && apt-get install -y postgresql-client libpq-dev \
6
+ && apt-get clean \
7
+ && rm -rf /var/lib/apt/lists/*
Original file line number Diff line number Diff line change @@ -17,8 +17,10 @@ ENV RAILS_ENV="production" \
17
17
FROM base as build
18
18
19
19
# Install packages needed to build gems
20
- RUN apt-get update -qq && \
21
- apt-get install --no-install-recommends -y build-essential git libvips pkg-config libpq-dev
20
+ RUN apt-get update -qq \
21
+ && apt-get install --no-install-recommends -y build-essential git libvips pkg-config libpq-dev \
22
+ && apt-get clean \
23
+ && rm -rf /var/lib/apt/lists/*
22
24
23
25
# Set bundler config to force ruby platform
24
26
RUN bundle config set force_ruby_platform true
@@ -45,7 +47,8 @@ FROM base
45
47
# Install packages needed for deployment
46
48
RUN apt-get update -qq && \
47
49
apt-get install --no-install-recommends -y curl libvips libpq-dev && \
48
- rm -rf /var/lib/apt/lists /var/cache/apt/archives
50
+ && apt-get clean \
51
+ && rm -rf /var/lib/apt/lists/*
49
52
50
53
# Copy built artifacts: gems, application
51
54
COPY --from=build /usr/local/bundle /usr/local/bundle
Original file line number Diff line number Diff line change @@ -11,8 +11,10 @@ ENV RAILS_ENV="development" \
11
11
PORT=3000
12
12
13
13
# Install packages needed to build gems
14
- RUN apt-get update -qq && \
15
- apt-get install --no-install-recommends -y build-essential git libvips pkg-config libpq-dev postgresql-client
14
+ RUN apt-get update -qq \
15
+ && apt-get install --no-install-recommends -y build-essential git libvips pkg-config libpq-dev postgresql-client \
16
+ && apt-get clean \
17
+ && rm -rf /var/lib/apt/lists/*
16
18
17
19
# Set bundler config to force ruby platform
18
20
RUN bundle config set force_ruby_platform true
You can’t perform that action at this time.
0 commit comments