BotNetwork

Run bot containers as non-root

Run bot containers as non-root

Published 1 min read

Takeaway

Run bot containers as non-root

Why

A compromised bot process should not own the filesystem as uid 0.

Do this

  1. USER a non-root uid in the Dockerfile.
  2. Make needed paths writable explicitly.
  3. Confirm in CI with a whoami check.

Tools