Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ross-humphrey/58c5803236135bd7fedc16f1dd7ffd82 to your computer and use it in GitHub Desktop.
Save ross-humphrey/58c5803236135bd7fedc16f1dd7ffd82 to your computer and use it in GitHub Desktop.
Notes taken during the 'Containerizing a Software Application with Docker' course

Containerizing a Software Application with Docker

Intro

  • Container driven delivery
  • The course covers
    • Anatomy of a Docker image
    • Techniques for building images
    • Authoring an image
    • Naming and sharing images

The Purpose of Docker Images

  • The need to innovate, fulfil customer expecation and react to market activity.
  • This imperative has led to Agile and Devops cultures.

Docker is a platform for packaging and delivering software in lightweight portable containers. Docker encourages - small and self container microservices Encapsulated microservices can then be deployed on many platforms.

Benefits of Microservices

  • Low impact service upgrades
  • Independtenly scaleable services
  • Minimized failure risk
  • Technological agnosticism
  • Shallow learning curve - great for new team members

Benefits of Docker

  • Aids CI/CD Workflows - removes platform dependencies
  • Standardized development environments
  • Enabled better mimcry of target platform
  • Affords increased developer productivity
  • Facilitates safe experimentations

What is a Docker Image?

  • A docker image is the foundational unit of the container
  • An image is like a read only template
    • Can be the source of many containers
  • Docker images have a 1 to many relationship with containers

What does an image provide?

  • A filesystem (+ any app code and dependencies)
  • Metadata - influences how a container runs (env variables etc)
  • Command - gets executed as a process on invocation

Two techniques for creating Docker images

  • Run container - executes commands and commit to a brand new image
  • Build image based on a sequence of instructions in a special file called a Dockerfile

Which method to use?

Commiting a container (Useful for experimenting - NOT Suitable for Production)

  • Ad hoc
  • Used for experimenting
  • Makes use of docker commit command
  • Often produces sub-optimal images

Dockerfile instructions - Recommended

  • Considered approach
  • Used for authoring images
  • Makes use of docker build commands
  • Produces highly optimized images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment