fstrim in a can
This is a small Docker recipe to build
fstrim easily and install it in your
How do I install
fstrim with this?
If you want to install
/usr/local/bin, just do this:
docker run --rm -v /usr/local/bin:/target bobtfish/fstrim
bobtfish/fstrim container will detect that
/target is a
mountpoint, and it will copy the
fstrim binary into it.
If you don't trust me, and prefer to extract the
rather than allowing my container to potentially wreak havoc into
$PATH, you can also do this:
docker run --rm bobtfish/fstrim cat /fstrim > /tmp/fstrim
Then do whatever you want with the binary in
- This only works on Intel 64 bits platforms.
All credit for this idea goes to jpetazzo for the nsenter container