This lesson is in the early stages of development (Alpha version)

Pitfalls and Best Practices

Overview

Teaching: 20 min
Exercises: 0 min
Questions
Objectives
  • Raise awareness for the most common mistakes made when working with Docker.

  • Give an overview of the considerations to be made when working with Docker.

Most Important Point

Choosing a Good Starting Point

Carefully picked base images for custom containers can help to avoid many security and maintenance issues.

Create Minimal and Well-Focussed Containers

Each container is supposed to run one application only. This makes it easier to maintain and manage them and reduces the time and resources required to generate, start and run them.

Leverage the Benefits of Automation

Containers can automatically be created with CI/CD toolchains (e.g. from GitLab, GitHub, Jenkins…) this can serve to reduce the amount of work involved while maintaining and updating your containers. Especially in combination with version control and automated backing up and pushing to registries, these solutions help to reduce the amount of tedious labour involved with creating containers to a minimum.

Cleaning up

When working with containers there may always be some files or processes being leftover or residual occupying memory and storage. Cleaning up can help reduce the workload on your system and free up disk space.

Further Reading

Key Points