Experiment with mount cache

This commit is contained in:
Ryan W
2023-05-06 10:55:42 -07:00
parent e881319eab
commit e90a4da10e
+8 -3
View File
@@ -5,7 +5,13 @@ ARG RUBY_VERSION=3.2.2
FROM ruby:${RUBY_VERSION}-slim FROM ruby:${RUBY_VERSION}-slim
# OS Level Dependencies # OS Level Dependencies
RUN apt-get update -qq && apt-get install -yq --no-install-recommends \ RUN --mount=type=cache,target=/var/cache/apt \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--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 \
build-essential \ build-essential \
gnupg2 \ gnupg2 \
less \ less \
@@ -13,8 +19,7 @@ RUN apt-get update -qq && apt-get install -yq --no-install-recommends \
libpq-dev \ libpq-dev \
postgresql-client \ postgresql-client \
libvips \ libvips \
curl \ curl
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV LANG=C.UTF-8 \ ENV LANG=C.UTF-8 \
BUNDLE_JOBS=4 \ BUNDLE_JOBS=4 \