I read often that both concepts are quite different, but I could not find a good explanation about where the differences lie. Both bundle dependencies and restrict talking to the outside world.

When should I pack my app in a container for deployment? When would encapsulated packages be preferable?