1
1
mirror of https://github.com/rui314/mold.git synced 2024-09-11 21:17:28 +03:00

Dockerfile: perform cleanup at the end

As recommended in Docker's documentation [^1]:

> In addition, when you clean up the apt cache by removing
> `/var/lib/apt/lists` it reduces the image size, since the apt cache
> is not stored in a layer.

This reduces the image size by ~0.5GiB.

[^1]: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get

Signed-off-by: Zhong Ruoyu <zhongruoyu@outlook.com>
This commit is contained in:
Zhong Ruoyu 2022-11-20 01:27:39 +08:00
parent 72fffee54f
commit ce3ac5d2f4
No known key found for this signature in database
GPG Key ID: 42F3B7E577C2156A

View File

@ -12,4 +12,5 @@ RUN apt-get update && \
wget -O- -q https://www.openssl.org/source/openssl-3.0.7.tar.gz | tar --strip-components=1 -xzf - && \
./Configure --prefix=/usr/local && \
make -j$(nproc) && \
make -j$(nproc) install
make -j$(nproc) install && \
rm -rf /var/lib/apt/lists/* /openssl