CLI in a Container

Can the cli be used from within a container? Or does it need to be run natively and then a container started based on the dockerfile the cli retrieves?
Was this page helpful?