garris / garris/BackstopJS

apt-get clean ineffective

Open
#1,004 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
621
PR merge metrics
No merged PRs in 30d

Description

In the Dockerfile you try to reduce the image size by cleaning the apt caches with

```
&& rm -rf /var/lib/apt/lists/* \
&& apt-get -qyy clean
```
the problem is that this only works when it is executed in the same `RUN` that also uses `apt-get update`, otherwise the data is already baked into a previous layer and all you achive is to record it as deleted which actually increases the layer size again.

See https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.