Common Docker gotchas that you need to avoid

Developing with Docker containers is growing in popularity and can be an extremely useful tool. Containers can create an easy-to-understand environment in which to carry out development.
However, a few problems consistently crop up when using containers that are not so simple to overcome unless you have the right tools to hand to fix them.

The Ellexus team has come up with our top three mistakes that can slow things down.

1. Base image incompatibility

The release of a new version of a base image, which is part of your application, with updated system packages is a common source of problems during development. You rebuild your application and pick up the latest version of the base image, and then suddenly your application isn’t working; it depended on a previous version of one of the installed system packages.
Which version is it on now? What version was it on before?

Determining what changed between the two base image versions can be difficult without the right tool, which can slow down development until you can track down the package version incompatibility.

2. Running unnecessary services

When building your container image, you should include only the services that are absolutely essential for the application the container will host. Anything extra wastes resources and widens the potential attack vector that could lead to security problems.

3. Storing critical data inside a container

This is a bad idea for two reasons. First, containerized data is not persistent by default, so you risk losing important data if the data exists inside a container. Second, storing sensitive data inside a container poses security risks because anyone who can access the running container could potentially gain access to private information.

Container Checker to the rescue

Ellexus Container Checker can help you to overcome these kinds of problems and more. By profiling the container, it generates information about the I/O patterns of your application to help you speed up the performance of your container.

For example, does your application carry out many small reads and writes or excess meta data operations? What files does your application need to run? And finally, where is your application wasting time?

The Container Checker report contains a summary of performance, common configuration mistakes and a complete list of files and programs used so you can easily see what your container is doing and make optimisations as necessary. It will even tell you which version of a third-party program your application is using – taking away those fun spot the difference games!