Skip to content

Commit e215ce7

Browse files
committed
DEV: Remove cache mounts from image/base Dockerfile
There are no substantial benefits from using cache mounts here so we are dropping those mounts.
1 parent 785fda3 commit e215ce7

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

image/base/Dockerfile

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,9 @@ RUN groupadd --gid 104 postgres &&\
2424
RUN echo 2.0.`date +%Y%m%d` > /VERSION
2525
RUN echo "deb http://deb.debian.org/debian ${DEBIAN_RELEASE}-backports main" > "/etc/apt/sources.list.d/${DEBIAN_RELEASE}-backports.list"
2626

27-
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
28-
--mount=type=cache,target=/var/cache/debconf,sharing=locked \
29-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
30-
--mount=type=tmpfs,target=/var/log \
31-
echo "debconf debconf/frontend select Teletype" | debconf-set-selections; \
32-
apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get -y install gnupg sudo curl fping locales \
27+
RUN --mount=type=tmpfs,target=/var/log \
28+
echo "debconf debconf/frontend select Teletype" | debconf-set-selections; \
29+
apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get -y install gnupg sudo curl fping locales \
3330
ca-certificates rsync \
3431
cmake g++ pkg-config patch \
3532
libxslt-dev libcurl4-openssl-dev \
@@ -74,10 +71,7 @@ RUN --mount=type=tmpfs,target=/root/.npm \
7471
npm install -g terser uglify-js pnpm
7572

7673
ADD install-imagemagick /tmp/install-imagemagick
77-
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
78-
--mount=type=cache,target=/var/cache/debconf,sharing=locked \
79-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
80-
/tmp/install-imagemagick
74+
RUN /tmp/install-imagemagick
8175

8276
ADD install-jemalloc /tmp/install-jemalloc
8377
RUN /tmp/install-jemalloc
@@ -86,21 +80,15 @@ RUN /tmp/install-jemalloc
8680
ADD nginx_public_keys.key /tmp/nginx_public_keys.key
8781
ADD install-nginx /tmp/install-nginx
8882

89-
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
90-
--mount=type=cache,target=/var/cache/debconf,sharing=locked \
91-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
92-
gpg --import /tmp/nginx_public_keys.key &&\
83+
RUN gpg --import /tmp/nginx_public_keys.key &&\
9384
rm /tmp/nginx_public_keys.key &&\
9485
/tmp/install-nginx
9586

9687
ADD install-redis /tmp/install-redis
9788
RUN /tmp/install-redis
9889

9990
ADD install-oxipng /tmp/install-oxipng
100-
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
101-
--mount=type=cache,target=/var/cache/debconf,sharing=locked \
102-
--mount=type=cache,target=/var/lib/apt,sharing=locked \
103-
/tmp/install-oxipng
91+
RUN /tmp/install-oxipng
10492

10593
RUN echo 'gem: --no-document' >> /usr/local/etc/gemrc &&\
10694
gem update --system

0 commit comments

Comments
 (0)