Experiment with cache mount
This commit is contained in:
@@ -64,9 +64,14 @@ RUN ./bin/rails assets:precompile
|
|||||||
FROM base
|
FROM base
|
||||||
|
|
||||||
# Install packages needed for deployment
|
# Install packages needed for deployment
|
||||||
RUN apt-get update -qq && apt-get install -yq --no-install-recommends \
|
RUN --mount=type=cache,target=/var/cache/apt \
|
||||||
libpq-dev \
|
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
--mount=type=tmpfs,target=/var/log \
|
||||||
|
rm -f /etc/apt/apt.conf.d/docker-clean; \
|
||||||
|
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache; \
|
||||||
|
apt-get update -qq \
|
||||||
|
&& apt-get install -yq --no-install-recommends \
|
||||||
|
libpq-dev
|
||||||
|
|
||||||
# Copy built artifacts: gems, application
|
# Copy built artifacts: gems, application
|
||||||
COPY --from=build /usr/local/bundle /usr/local/bundle
|
COPY --from=build /usr/local/bundle /usr/local/bundle
|
||||||
|
|||||||
Reference in New Issue
Block a user