Docker Exec Path-based Commands

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:

HTH,


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




Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top