22 – Buzzword Alert – Container Basics

Date: 5/25/2020

Guests: None

Welcome and greetings

Recap of last episode

  • In the last episode, I discussed my adventure in MacBook Pro purchasing and upgrading. It’s not really a bad experience if you have the right tools, a little know-how, and a little bit of luck.
  • Check out the full episode using the following link.

Scott’s Spot 5 – Tech Review – Mid-2012 Uni-body MacBook Pro

Summary of this episode

  • In this episode, I’m going to discuss everyone’s favorite topic….containers. I’ll discuss what containers are, how they are different from a regular bare metal server or Virtual Machine, and how they can make your application deployments and upgrades easier.

What’s in it for you?

  • After listening to this episode, you will be able to discuss containers with confidence, determine if containers are the right fit for your applications, and have the knowledge to begin the process of creating containerized applications.

Episode Content

  • What is a container?
    • An object that can be used to hold or transport something.
    • A standardized unit of software – from the Docker website
  • Container terminology
    • Container – a running instance of an image
    • Image (or container image) – an application that is coded as a container. A container is basically an instantiated image. There are currently several different formats for container images (Docker, Appc, LXD, etc.). The Open Container Initiative (OCI) is striving to define an industry standard for the image formats.
    • Image Layer – one or more items that have been added to an image configuration. Each update to an Image results in the differences being stored as a new layer in the configuration.
    • Base Image – every container has a base image or O/S that it is built off of. This is the starting point for new containers. There are several different ones to choose from: alpine, tinyOS, etc. Each one has some of the functionality that you would find the full version of an operating system, but not all of it.
    • Registry – contains a list of available images that can be downloaded and instantiated as containers. These can be hosted on-site by a company or they can allow their developers to use external registries. This can cause security concerns as you cannot always determine the security profile of an external image.
    • Repository – this is what you pull from a container registry. A pull command will download all version (tags) of the application hosted in that container image.
      • ex. docker pull abcxyz
        • abcxyz is the repository
        • and individual image would be abcxyz:latest or abcxyz:ver1.1
    • Tag – similar to how tags are used in git to identify a container at a specific point in time.
      • Refers to a specific version of a container image.several
        • abxyz:latest
        • abcxyz:ver1.1
    • Docker – this is a very popular container management system.
    • Dockerfile – this is a configuration file that is used to build a container.
    • Podman – another container management system.
  • How does it differ from a Virtual Machine or server?
    • A server is basically what you see is what you get when it comes to memory, cpu and storage. A Server can dual boot, but typically only runs one type of Operating system.
    • A Virtual Machine can have memory, cpu, and storage changed on the fly. A virtual machine doesn’t have its own physical hardware and shares resources with other VMs on the host. It still has its own full copy of the Operating System, so a defined number of VMs can run on a given host.
    • A container shares the system resources with other containers running on the system. It actually uses system level resources so its container OS can be much smaller and more containers can be run on a given host.
  • Where do containers run?
    • There are many flavors of containers and depending on how they are architected, they can be run on linux, unix, or windows hosts.
  • What can you put in a container?
    • Best practice is that each container should encapsulate a single application.
    • If you have multiple applications, you can put each one in a separate container and open ports between them so that they can communicate.
  • What are the benefits of using containers for application development?
    • Its easy to create your dockerfile (or similar manifest) at the same time as your application (they can both share the same source code repository).
    • If you mess up a container in development, you can trash it and create a new one quickly
  • What are the benefits of running your “production” applications in a container?
    • Its easy to scale your capacity by quickly spinning up new instances of your application that is running in their own container instance.
    • If one has a problem, you can easily kill it off and then create a new one to replace it. This results in very little downtime unless you are running an orchestration tool to manage your containers.
  • What happens when a container has a problem?
    • Like we said, you can easily destroy or freeze the problem container, create a new instance, and then troubleshoot what caused the problem with the original container.
  • How do you create a container?
    • First, you can download a container image of the source OS (alpine is an example)
    • Then you create a container by using the “docker run” or similar command.
    • You can then log into the container and manually install and configure all the software that your application needs.
    • Or….you can take the easy route and create a dockerfile that contains all the configuration information that the container manager needs to create and run your container.
  • How and when do you choose a third party source (vendor) for your containers?
    • You can use the open source version of the container managers or if you have a high priority application you can opt for the vendor supported route to ensure that there is a lower chance of failure in either the container or the container management system.

Recap of this episode

Like me….. Like my podcast…. Please share the link, click on the like, give us a thumbs-up, leave us a review, hit the subscribe button, and tell your friends!

Next Episode: <next_episode_description_here>

Where you can find us!

Direct Messages:

  • @cs_everhart on Twitter
  • ScottTalksTech group on Facebook
  • ScottTalksTech.slack.com

Links to Podcast Providers: