A container is a packaged software code along with all of its dependencies so that it can run consistently across clouds and on-premises. This packaging up of code is often called encapsulation. Encapsulating code is important for developers as they don’t have to develop code based on each individual environment.