Skip to content

CI: reduce docker image sizes #105176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/ci/docker/host-aarch64/aarch64-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
gdb \
libssl-dev \
pkg-config \
xz-utils
xz-utils \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ RUN yum upgrade -y && \
wget \
xz \
zlib-devel.i686 \
zlib-devel.x86_64
zlib-devel.x86_64 \
&& yum clean all

RUN mkdir -p /rustroot/bin && ln -s /usr/bin/cmake3 /rustroot/bin/cmake

Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/dist-x86_64-freebsd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
xz-utils \
wget \
libssl-dev \
pkg-config
pkg-config \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/freebsd-toolchain.sh /tmp/
RUN /tmp/freebsd-toolchain.sh x86_64
Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/dist-x86_64-illumos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends \
libgmp-dev \
libmpfr-dev \
libmpc-dev
libmpc-dev \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/illumos-toolchain.sh /tmp/

Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ RUN yum upgrade -y && \
wget \
xz \
zlib-devel.i686 \
zlib-devel.x86_64
zlib-devel.x86_64 \
&& yum clean all

RUN mkdir -p /rustroot/bin && ln -s /usr/bin/cmake3 /rustroot/bin/cmake

Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
gdb \
patch \
libssl-dev \
pkg-config
pkg-config \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /build/

Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/i686-gnu-nopt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gdb \
zlib1g-dev \
lib32z1-dev \
xz-utils
xz-utils \
&& rm -rf /var/lib/apt/lists/*


COPY scripts/sccache.sh /scripts/
Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/i686-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gdb \
zlib1g-dev \
lib32z1-dev \
xz-utils
xz-utils \
&& rm -rf /var/lib/apt/lists/*


COPY scripts/sccache.sh /scripts/
Expand Down
8 changes: 4 additions & 4 deletions src/ci/docker/host-x86_64/mingw-check/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
xz-utils \
libssl-dev \
pkg-config \
mingw-w64
mingw-w64 \
&& rm -rf /var/lib/apt/lists/*

RUN curl -sL https://nodejs.org/dist/v16.9.0/node-v16.9.0-linux-x64.tar.xz | tar -xJ
ENV PATH="/node-v16.9.0-linux-x64/bin:${PATH}"
# Install es-check
# Pin its version to prevent unrelated CI failures due to future es-check versions.
RUN npm install es-check@6.1.1 -g
RUN npm install eslint@8.6.0 -g
RUN npm install es-check@6.1.1 eslint@8.6.0 -g

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

COPY host-x86_64/mingw-check/reuse-requirements.txt /tmp/
RUN pip3 install --no-deps --require-hashes -r /tmp/reuse-requirements.txt
RUN pip3 install --no-deps --no-cache-dir --require-hashes -r /tmp/reuse-requirements.txt

COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/test-various/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
ovmf \
qemu-efi-aarch64 \
qemu-system-arm \
qemu-system-x86
qemu-system-x86 \
&& rm -rf /var/lib/apt/lists/*

RUN curl -sL https://nodejs.org/dist/v15.14.0/node-v15.14.0-linux-x64.tar.xz | \
tar -xJ
Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/wasm32/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
sudo \
gdb \
xz-utils \
bzip2
bzip2 \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/emscripten.sh /scripts/
RUN bash /scripts/emscripten.sh
Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/x86_64-gnu-aux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
llvm-dev \
libfreetype6-dev \
libexpat1-dev \
tidy
tidy \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
xz-utils \
lld \
clang
clang \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gdb \
xz-utils \
libssl-dev \
pkg-config
pkg-config \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
zlib1g-dev \
xz-utils \
nodejs
nodejs \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
Expand Down
8 changes: 4 additions & 4 deletions src/ci/docker/host-x86_64/x86_64-gnu-llvm-13/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
pkg-config \
zlib1g-dev \
xz-utils \
nodejs
nodejs \

# Install powershell so we can test x.ps1 on Linux
RUN apt-get update && \
apt-get install -y apt-transport-https software-properties-common && \
apt-transport-https software-properties-common && \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change forwards --no-install-recommends for this packages too.

curl -s "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb" > packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
apt-get update && \
apt-get install -y powershell
apt-get install -y powershell \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/x86_64-gnu-nopt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
gdb \
libssl-dev \
pkg-config \
xz-utils
xz-utils \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
Expand Down
6 changes: 3 additions & 3 deletions src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
sudo \
xz-utils \
tidy
tidy \

# Install dependencies for chromium browser
RUN apt-get install -y \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change forwards --no-install-recommends for this packages too.

gconf-service \
libasound2 \
libatk1.0-0 \
Expand Down Expand Up @@ -56,7 +55,8 @@ RUN apt-get install -y \
libnss3 \
lsb-release \
xdg-utils \
wget
wget \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/x86_64-gnu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
gdb \
libssl-dev \
pkg-config \
xz-utils
xz-utils \
&& rm -rf /var/lib/apt/lists/*

COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
Expand Down