tpm2-software / tpm2-software-container

Container building stuff
BSD 2-Clause "Simplified" License
13 stars 19 forks source link

modules: merge RUN commands together #57

Closed niooss-ledger closed 3 years ago

niooss-ledger commented 3 years ago

Hello, When building some images on a system with 60 GB free disk space, the build fails with "no space left on device". This is caused by the large number of layers which are created for each image.

Minimize the number of intermediate layers by combining all RUN statements together in each module, when this is appropriate.

Also use cd ... instead of WORKDIR statements to also reduce the number of intermediate layers.

With this, podman build -f ./fedora-32.docker succeeds on my test system which has "only" 60 GB free disk space.