Skip to content

A Dockerfile Optimization Support Tool for Improving Docker Image Quality

Notifications You must be signed in to change notification settings

kusumotolab/DfileProfiler

Repository files navigation

DfileProfiler

logo

DfileProfiler is a Visual Studio Code extension designed to analyze and visualize Docker image builds.
This tool provides insights into the size and build time for each layer, and changes across different builds.

Requirements

  • Windows 10 or later
  • macOS 10.15 or later
  • Visual Studio Code 1.97 or later
  • Docker: Must be installed and running

Features

Build and Analyze Docker Image

  1. Start Docker.
  2. Open VSCode and navigate to File → Open Folder... to open your Docker project.
  3. Open the Dockerfile and click the DfileProfiler button to activate the extension. A sidebar will appear with a text area and the Build button.
  4. You can input comments in the text area (similar to Git commit messages) to document changes for the build (optional).
  5. Click the Build button to start the image build process.
  6. Once the build is complete, an analysis view (Layer View) will be displayed. The generated image will be named myimage.

tool_build_anlyze

Layer View

Tabs allow switching between the two views:

  • Relative View: Displays each layer's size and build time as a percentage of the total.
  • Diff View: Displays differences in size and build time between the latest build and a selected previous build.

If multiple builds exist, a pagination system allows selecting builds for comparison.

tool_view

Mapping Layers to Dockerfile

Hovering over a layer in Layer View highlights the corresponding lines in the Dockerfile.

Clicking on a layer navigates to the corresponding lines in the Dockerfile.

tool_mapping

Rebuild Notification for Affected Layers

If the Dockerfile or an external dependency file is modified, an icon appears indicating which layers require rebuilding due to build cache invalidation.

tool_cache

Release Notes

1.0.0

Initial release with features presented in the IEICE technical report.

1.1.0

Added the feature to select builds for comparison and to input comments at build time.

Future Enhancements

  • Performance improvements in rendering.
  • Functionality to estimate the cause of Dockerfile smells and suggest fixes.

About

A Dockerfile Optimization Support Tool for Improving Docker Image Quality

Resources

Stars

Watchers

Forks

Packages

No packages published