Skip to content

Commit 72f1568

Browse files
Reduce docker image size and fix apt updates
- Clean up ruby installation artifacts in base dockerfiles. - Ensure `apt-get update` is run before installation steps to fix build failures. - Fix potential apt cache issues in `docker/chromium/base/ubuntu-24-04.Dockerfile`.
1 parent c6fadca commit 72f1568

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docker/base/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ RUN curl -sS https://releases.nixos.org/patchelf/patchelf-0.9/patchelf-0.9.tar.b
8787
rm -rf /tmp/patchelf-*
8888

8989
# Install Ruby, for Ruby fuzzing.
90-
RUN apt-get install -y binutils xz-utils libyaml-dev libffi-dev zlib1g-dev && \
90+
RUN apt-get update && apt-get install -y binutils xz-utils libyaml-dev libffi-dev zlib1g-dev && \
9191
RUBY_VERSION=3.3.1 && \
9292
curl -O https://cache.ruby-lang.org/pub/ruby/3.3/ruby-$RUBY_VERSION.tar.gz && \
9393
tar -xvf ruby-$RUBY_VERSION.tar.gz && \

docker/base/ubuntu-20-04.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ RUN curl -sS https://releases.nixos.org/patchelf/patchelf-0.9/patchelf-0.9.tar.b
8787
rm -rf /tmp/patchelf-*
8888

8989
# Install Ruby, for Ruby fuzzing.
90-
RUN apt-get install -y binutils xz-utils libyaml-dev libffi-dev zlib1g-dev && \
90+
RUN apt-get update && apt-get install -y binutils xz-utils libyaml-dev libffi-dev zlib1g-dev && \
9191
RUBY_VERSION=3.3.1 && \
9292
curl -O https://cache.ruby-lang.org/pub/ruby/3.3/ruby-$RUBY_VERSION.tar.gz && \
9393
tar -xvf ruby-$RUBY_VERSION.tar.gz && \

docker/base/ubuntu-24-04.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ RUN curl -sS https://releases.nixos.org/patchelf/patchelf-0.9/patchelf-0.9.tar.b
6464
rm -rf /tmp/patchelf-*
6565

6666
# Install Ruby, for Ruby fuzzing.
67-
RUN apt-get install -y binutils xz-utils libyaml-dev libffi-dev zlib1g-dev && \
67+
RUN apt-get update && apt-get install -y binutils xz-utils libyaml-dev libffi-dev zlib1g-dev && \
6868
RUBY_VERSION=3.3.1 && \
6969
curl -O https://cache.ruby-lang.org/pub/ruby/3.3/ruby-$RUBY_VERSION.tar.gz && \
7070
tar -xvf ruby-$RUBY_VERSION.tar.gz && \

docker/chromium/base/ubuntu-24-04.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ENV UPDATE_WEB_TESTS True
1212

1313
# Note: snapcraft installation seems to always fail.
1414
RUN ln -s /usr/local/bin/python3.11 /usr/local/bin/python3
15-
RUN echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && curl 'https://chromium.googlesource.com/chromium/src/+/main/build/install-build-deps.py?format=TEXT' | base64 -d > /tmp/install-build-deps.py && sed -i s/snapcraft/doesnotexist/ /tmp/install-build-deps.py && sed -i "s/if requires_pinned_linux_libc():/if False:/" /tmp/install-build-deps.py && chmod u+x /tmp/install-build-deps.py && /tmp/install-build-deps.py --backwards-compatible --no-prompt --no-chromeos-fonts --syms --lib32
15+
RUN apt-get update && echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && curl 'https://chromium.googlesource.com/chromium/src/+/main/build/install-build-deps.py?format=TEXT' | base64 -d > /tmp/install-build-deps.py && sed -i s/snapcraft/doesnotexist/ /tmp/install-build-deps.py && sed -i "s/if requires_pinned_linux_libc():/if False:/" /tmp/install-build-deps.py && chmod u+x /tmp/install-build-deps.py && /tmp/install-build-deps.py --backwards-compatible --no-prompt --no-chromeos-fonts --syms --lib32
1616

1717

1818
RUN dpkg --add-architecture i386 && \

0 commit comments

Comments
 (0)