Sort of, except you really want it to be done at the end of the current
request. (auto-cleanup doesn't seem to do that, setting it to 0 turns it
off).

When you're building a docker image you really want to make sure the end of
every command only the things the NEED are in the filesystem as a snapshot
is taken at the point. If you're wanting to reduce container size this is
important.

I might take a look at zef today if I have time and see if I can work out a
simple version.

Simon

On Thu, 25 May 2017 at 08:06 Ahmad Zawawi <ahmad.zaw...@gmail.com> wrote:

> Something like cpanm's work directory auto-cleanup mechanism?
>
>
> https://metacpan.org/pod/distribution/App-cpanminus/lib/App/cpanminus/fatscript.pm#-auto-cleanup
>
> On Thu, May 25, 2017 at 7:20 AM, Simon Proctor <simon.proc...@gmail.com>
> wrote:
>
>> So I'm playing around with Docker files (Perl 5 ATM) and one thing I'm
>> getting quite into is trying to keep them small. An important part of this
>> is deleting any extraneous caching info built up during the build,
>> preferably as part of the RUN step to get intermediate layers small.
>>
>> (So with Perl5 and cpanm `rm -rf ~/.cpanm` is your friend).
>>
>> Anyhoo, my thought was could we add something to zef to do this? Either a
>> flag or a new command to auto clean up the ~./zef folder.
>>
>> Yes I know rm -rf ~/.zef is simple to type but if it was built into the
>> command it would show forward thinking. Or something.
>>
>> It's 5am and I couldn't sleep. This is the kind of idea I get.
>>
>> Simon
>>
>

Reply via email to