container: add AttachToContainer

Closes #5.