Skip to content

`docker-flatten` is a tool that allows you to flatten Docker images by removing unnecessary layers, turning your container's filesystem into a single pristine layer. This helps reduce image size and removes bloat that accumulates over time.

License

Notifications You must be signed in to change notification settings

norcimo5/docker-flatten

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

docker-flatten

docker-flatten is a tool that allows you to flatten Docker images by removing unnecessary layers, turning your container's filesystem into a single pristine layer. This helps reduce image size and removes bloat that accumulates over time.

Features

  • Export a running container's filesystem and create a new image from it
  • Strip away Docker image layers to create a clean, minimal base
  • Simple and efficient for creating optimized Docker images without needing a Dockerfile

Installation

  1. Clone this repository:

    git clone https://github.com/<your-username>/docker-flatten.git
  2. Navigate to the repository:

    cd docker-flatten
  3. Make the script executable:

    chmod +x docker-flatten
  4. Optionally, move it to a directory in your PATH for easy access:

    sudo mv docker-flatten /usr/local/bin/

Usage

To flatten an image and create a new minimal image, run the following command:

docker-flatten <source-image> <new-image-name>

About

`docker-flatten` is a tool that allows you to flatten Docker images by removing unnecessary layers, turning your container's filesystem into a single pristine layer. This helps reduce image size and removes bloat that accumulates over time.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages