Docker solves a problem that shouldn't even exist,
reproduciable builds. (also some security and encapsulated
environment)
If u can avoid it don't use it, just try to get
statically linked binaries, without runtime dependencies and
use chroot, unveil and pledge and it's equivalent on
linux.
Application level security is better than ennvironment
level security, because it can be more restrictive.
Can also use on openbsd one user for each
application.