fix docke run -rm

Fixes #2817