# Docker Buildx

Published articles for Docker Buildx.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Squashing Docker images with Buildx

DevFeed: [Squashing Docker images with Buildx](<https://devfeed.tech/articles/squashing-docker-images-with-buildx-27736.md>)

Original publisher: [Read original article](<https://gagor.pro/2025/12/squashing-docker-images-with-buildx/>)

Author: Tom

Published: 2025-12-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [Docker](<https://devfeed.tech/topics/docker.md>), [docker images](<https://devfeed.tech/topics/docker-images.md>), [Dockerfile](<https://devfeed.tech/topics/dockerfile.md>), [Caching](<https://devfeed.tech/topics/caching.md>)

Tags: [best-practices](<https://devfeed.tech/tags/best-practices.md>), [build](<https://devfeed.tech/tags/build.md>), [build-system](<https://devfeed.tech/tags/build-system.md>), [caching](<https://devfeed.tech/tags/caching.md>), [devops](<https://devfeed.tech/tags/devops.md>), [docker](<https://devfeed.tech/tags/docker.md>), [docker-buildx](<https://devfeed.tech/tags/docker-buildx.md>), [docker-image-optimization](<https://devfeed.tech/tags/docker-image-optimization.md>), [docker-images](<https://devfeed.tech/tags/docker-images.md>), [docker-layer-management](<https://devfeed.tech/tags/docker-layer-management.md>), [dockerfile-best-practices](<https://devfeed.tech/tags/dockerfile-best-practices.md>), [linux](<https://devfeed.tech/tags/linux.md>), [squash-docker-image](<https://devfeed.tech/tags/squash-docker-image.md>)

### AI overview

This tutorial explains how to create smaller Docker images with Buildx by rebuilding the final filesystem state into a new image, removing intermediate layers. It also discusses the trade-off: this approach can prevent reuse of base-image layer caching, while selectively copying files follows a builder-pattern alternative.

### Source excerpt

Learn how to squash Docker images using Buildx to create smaller, more efficient images by consolidating layers.