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