@@ -22,7 +22,7 @@ RUN gem update --system --no-document && \
2222RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt \
2323 --mount=type=cache,id=dev-apt-lib,sharing=locked,target=/var/lib/apt \
2424 apt-get update -qq && \
25- apt-get install --no-install-recommends -y curl libjemalloc2 sqlite3
25+ apt-get install --no-install-recommends -y curl libjemalloc2 libvips sqlite3
2626
2727# Set production environment
2828ENV BUNDLE_DEPLOYMENT="1" \
@@ -38,7 +38,7 @@ FROM base AS build
3838RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt \
3939 --mount=type=cache,id=dev-apt-lib,sharing=locked,target=/var/lib/apt \
4040 apt-get update -qq && \
41- apt-get install --no-install-recommends -y build-essential libyaml-dev node-gyp pkg-config python-is-python3
41+ apt-get install --no-install-recommends -y build-essential libffi-dev libyaml-dev node-gyp pkg-config python-is-python3
4242
4343# Install JavaScript dependencies
4444ARG NODE_VERSION=xxx
@@ -79,6 +79,11 @@ RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile
7979# Final stage for app image
8080FROM base
8181
82+ # Install packages needed for deployment
83+ RUN --mount=type=cache,id=dev-apt-cache,sharing=locked,target=/var/cache/apt \
84+ --mount=type=cache,id=dev-apt-lib,sharing=locked,target=/var/lib/apt \
85+ apt-get update -qq && \
86+ apt-get install --no-install-recommends -y imagemagick libvips
8287
8388# Copy built artifacts: gems, application
8489COPY --from=build "${BUNDLE_PATH}" "${BUNDLE_PATH}"
0 commit comments