apt-get clean ineffective
Open
- 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
Assessment
This issue has not been assessed yet.