Docker Exec Path-based Commands

Posted by in IT, Tutorial

TL;DR: Use sh -c "command with arguments"

I’ve tried to execute

in order to see the size used by a container’s logs. Unfortunately, this resulted in an error along the lines:

du: C:/Program Files/Git: No such file or directory

This means that my git bash prompt interpreted the / itself. In order to get around this limitation, you need to run:


A little experiment: If you find this post and ad below useful, please check the ad out :-)