Increasing Your CI/CD Velocity with Slim Containers

We’ll explain what Slim Containers are, how they speed up the build process, and how they can improve the efficiency of your testing.
Mike Mackrory
Nov 07, 2022

Photo by NASA on Unsplash

Increasing Your CI/CD Velocity with Slim Containers

As engineers, we’ve adopted Continuous Integration and Continuous Deployment (CI/CD) as essential processes to get solutions into production faster. In addition to getting excellent solutions deployed, we also need to ensure that any dubious solutions are quickly identified and mitigated by adopting a fail-fast approach. The core concept behind this is speed, and anything that helps us increase the velocity of our CI/CD pipeline helps us become more effective.

In a previous blog post, Nicolas Bohorquez described the process of automating DockerSlim as part of a CI/CD pipeline. This blog post will discuss why that is important and how it’s vital for creating a faster and more efficient deployment pipeline. We’ll explain what Slim Containers are, how they speed up the build process, and how they can improve the efficiency of your testing. Let’s get started!

What Is a Slim Container?

Generally speaking, the most efficient approach to coding is to come up with the most straightforward and elegant way to solve a problem. You eliminate any extraneous method calls and ensure that you’re not attempting to solve problems that are outside the scope of the original problem statement. Similarly, Slim Containers are designed to eliminate unnecessary content. A Slim Container contains what is necessary to support the application – and nothing more.

Unlike the process of creating simple and elegant code, though, all the optimization is taken care of for you when you use DockerSlim for Slim Containers. You can continue to use your existing base image, your package manager of choice, and any additional Docker Image Layers. Once your container is defined, you can use DockerSlim to minify your image. This step removes all the unnecessary parts of the image and keeps the parts that you need.

While this post explicitly addresses speed, this process can also reduce risks to the application by reducing the attack surface and creating a more secure container. If you’d like to read more about that, Chris Tozzi addressed some of those benefits in a blog post on building more secure images for your production environment.

How Slim Containers Speed Up Your CI/CD Pipeline

When you use Slim Containers in your CI/CD pipeline, the speed of your pipeline is affected in two distinct ways. First, because the size of the containers is significantly smaller, the builds complete faster. Second, because the containers are smaller, they require fewer resources within the pipeline. That frees up those resources to be used by other builds, which results in increased efficiency throughout the pipeline.

Automated testing is a critical component of a successful CI/CD pipeline. Testing is what builds trust in your pipeline. When implemented appropriately and thoroughly, your engineers can feel confident that the pipeline will comprehensively test any changes or additions of new code. A good testing strategy allows your pipeline to fail quickly if coding problems are introduced, and it enables changes to be deployed rapidly when they meet the requirements.

A smaller and more focused container limits the scope of testing requirements and ensures that testing covers a more significant percentage of the deployed solution. As a direct result of the need to test a smaller and more defined container, you can execute the test suite more rapidly, thereby further reducing the time between build and deployment.

Taking Your CI/CD Pipeline to the Next Level

The idea is beautiful in its simplicity. Implementing Slim Containers as part of your DevOps processes requires adding a few automated steps within your CI/CD pipeline. This blog post provides an excellent blueprint for including such steps in your build process.

There is very little change to the level of effort required of your engineers. They can continue to follow the same processes to design and develop solutions. DockerSlim automatically reduces your container images to include only the parts of the image that are required for your solution.

A smaller image consumes fewer resources and requires less time for the integration, testing, and deployment phases, resulting in a faster and more efficient pipeline to production.

Learning More

The Slim platform is revolutionizing how we build and deploy containers within our production systems. By reducing the size and complexity of our images, we'll experience an increase in deployment velocity while simultaneously decreasing the amount of resources that our pipelines consume and improving our applications' security.

The Slim platform supports all industry leaders in version control and automated deployment pipelines. Log in to the Slim Portal with your GitHub, GitLab, or BitBucket credentials today to learn more about how Slim can improve the efficiency and speed of your CI/CD pipelines.

Bio

Mike Mackrory is a Global citizen who has settled down in the Pacific Northwest - for now. By day he works as an Engineer Manager for a DevOps team, and by night he writes and tinkers with other technology projects. When he's not tapping on the keys, he can be found trail-running, hiking and exploring both the urban and the rural landscape with his kids. Always happy to help out another developer, he has a definite preference for helping those who bring gifts of gourmet donuts, craft beer and/or Single-malt Scotch.

Related Articles

Automating DockerSlim in Your CICD Pipeline

Using GitHub Actions, you can refine container images automatically making them smaller, faster to load, and more secure by default – all without sacrificing any capabilities.

Nicolas Bohorquez

Contributor

Building DockerSlim into a Jenkins Pipeline

A step by step tutorial on building DockerSlim into your CI/CD pipeline.

Cloud Development Is Still Too Manual & Complex

Lessons we learned from interviewing more than 30 developers

John Amaral

CEO

Improving the Developer Experience When Adopting Cloud-Native Best Practices

PaymentWorks Case Study

Josh Viney

Product

Integrate Testing into Your Container Pipeline

A closer look at testing within container pipelines, CI/CD, software delivery, and containerization.

Faith Kilonzi

Software Engineer

Where Do You Store Your Container Images?

Container Registry Options are Growing in Number and Complexity

Pieter van Noordennen

Growth

Creating a Container Pipeline with GitLab CI

Shipping containers the easy way

Nicolas Bohorquez

Contributor

5 Most Commonly Asked DockerSlim Questions

We enlisted DockerSlim expert and Slim.AI Developer Experience Engineer to dive into how container slimming works.

Primož Ajdišek

Technical Staff

5 Ways Slim Containers Save You Money

Do slim containers really save you money on your cloud bill? Are there cost advantages to smaller containers? Find out here.

Chris Tozzi

Building Apps Using Cloud Native Buildpacks

Getting started with this innovative technique

Vince Power

Contributor

Clarifying the Complex: Meet Ivan Velichko, Container Dude at Slim.AI

Ivan recently joined the team at Slim.AI, and we sat down with him to learn more about the path that led him here.

Ivan Velichko

Container Dude

Container Insights: Dissecting the World's Most Popular Containers

Join Ayse Kaya in this series, as she creates her 2022 Container Report Chalk Full of Important Security Findings for Developers.

Ayse Kaya

Analytics & Strategy

Container of the Week: Python & Flask

Our weekly breakdown of a popular container

What We Discovered Analyzing the Top 100 Public Container Images

Complexity abounds in modern development

Ayse Kaya

Analytics & Strategy

2022 Public Container Report

Vulnerabilities continue to increase and developers are struggling to keep up.

Ayse Kaya

Analytics & Strategy

Containerizing Python Apps for Lambda

A tutorial on deploying AWS Lambda using containers, Python edition.

Docker Containers for Your Raspberry Pi

Compact PCs need compact apps

Martin Wimpress

Community

Explore and analyze a Docker container with DockerSlim X-Ray

Understanding container composition

Martin Wimpress

Community

Five Proven Ways to Debug a Container

When Things Just Are Not Working

Theofanis Despoudis

Contributor

Five Things You Should Never Ship to Production in a Container

Here is our take on five things to avoid when creating a container or shipping it to production.

Chris Tozzi

Reducing Docker Image Size - Slimming vs Compressing

Know the difference

Pieter van Noordennen

Growth

Serverless Applications and Docker

How to Scale the Latest Trend in Infrastructure

Pieter van Noordennen

Growth

Slim.AI Docker Extension for Docker Desktop

How to access our Docker Extension and try it for yourself.

Josh Viney

Product

Slimming a Rails Application with DockerSlim

Dissect a simple Rails application container using DockerSlim to analyze, optimize, and deploy your product more quickly.

Theofanis Despoudis

Contributor

Using AppArmor and SecComp Profiles for Security Audits

Conduct better container security audits using tools like SecComp, NGINX, and Docker.

What’s in your container?

Why Docker Layers matter for container optimization

Pieter van Noordennen

Growth

Why Developers Shouldn't Have to Be Infrastructure Experts, Too

Simplifying processes required to containerize and deploy cloud-native apps.

Chris Tozzi

A New Workflow for Cloud Development

Leverage the benefits of containerization without the headaches & hassle

John Amaral

CEO

Why Don’t We Practice Container Best Practices?

Container best practices are easy to understand, hard to do

John Amaral

CEO

Better Security Audits with AppArmor and SecComp via DockerSlim

Combine the power of tools like SecComp, NGINX, and Docker.