Closed kuba3351 closed 1 year ago
The --no-cache
option in docker build
is not related to this. You can (need to) explicitly choose to clean the cache inside the filesystem - this behavior is exactly the same as e.g. apt
and dnf
and I don't think we should change it because it would break the use case of installing in multiple command invocations.
Instead, you can clean the cache explicitly; see e.g. https://github.com/coreos/layering-examples/blob/5644ba14808e3c439bd22204d07eef76bea6e089/wifi/Containerfile#L4
Hello
Rpm-ostree has a nice feature that if I am using an ostree native container feature, I can use
rpm-ostree install
command inside a Dockerfile to install some additional packages into the image. But this produces a cache in/var/cache
directory in a result image. The good practice in the OCI images is to keep them as small as possible, and if you use any Dockerfile linter, it will recommend to use--no-cache
flag during installing any packages using any package manager. I didn't found such flag in rpm-ostree. I think rpm-ostree should have a--no-cache
flag that triggers delete cache after installing packages or remove cache automatically when it detects usage in a container.Host system details
Not necessary
Expected vs actual behavior
Actual:
Expected:
Empty
/var/cache
dir in the result imageSteps to reproduce it
Use
rpm-ostree install
command in the Dockerfile and check that rpm-ostree cache exists in/var/cache
in a result image.Would you like to work on the issue?
No, I don't have necessary experience