DockForge bridges the gap between writing complex Dockerfiles and managing local containers. It provides a rich graphical interface (GUI) directly inside VS Code to build, validate, manage, and push Docker images—all without needing to memorize Docker CLI syntax.
- Visual Dockerfile Builder: Create multi-stage Dockerfiles using a modern React-based drag-and-drop interface.
- Real-Time Validation & Linting: Catch errors before you build. Get instant warnings for missing base images, misconfigured ports, and suggestions for best practices (e.g., merging
RUNcommands). - Docker Hub Integration: Log in, search repositories, fetch tags, and push images directly to Docker Hub from the sidebar.
- Local Image Management: View, run, tag, and delete local Docker images through an intuitive Tree View.
- One-Click Build & Run: Build your custom image and spin up a container with a single click.
Before using DockForge, ensure you have the following installed:
- Visual Studio Code (v1.75.0 or higher)
- Docker Desktop (must be running to build and run images)
- Open the DockForge sidebar by clicking the stack logo in the VS Code Activity Bar.
- Click "+ Create New Dockerfile" in the Build Dockerfiles panel.
- Name your file and use the visual builder to add stages and commands (
FROM,RUN,COPY, etc.). - Click "Insert to Workspace" to save the generated
Dockerfileto your project.
- Open an existing Dockerfile in the DockForge Builder.
- In the "Build Image" section, configure your image name and tag.
- Click "Build Image" to compile.
- Navigate to the "Docker Images" tree view, right-click your new image, and select "Run Container".
Access these commands via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
| Command | Description |
|---|---|
DockForge: Create New Dockerfile |
Create a new Dockerfile using the visual builder. |
DockForge: Open Dockerfile Builder |
Open the visual builder for an existing Dockerfile. |
DockForge: Refresh Dockerfiles |
Refresh the workspace Dockerfiles tree view. |
DockForge: Docker Hub Login |
Authenticate securely with Docker Hub. |
Push to Docker Hub |
Push a local image to your Docker Hub repository. |
Run Container |
Spin up a container from a selected image. |
Tag / Rename Image |
Add a new tag or rename a local Docker image. |
DockForge features a custom linting engine that evaluates your Dockerfiles against industry best practices:
- Warnings (Critical Issues): Detects missing base images, empty commands, invalid port numbers in
EXPOSE, multipleCMD/ENTRYPOINTinstructions, andCOPY/ADDcalls beforeWORKDIR. - Suggestions (Optimizations): Recommends naming intermediate stages, merging sequential
RUNcommands to reduce layer count, and usingCOPYoverADD.
Want to contribute or hack on DockForge locally?
DockForge is split into two main environments:
src/: The VS Code Extension Host (TypeScript). Handles Docker CLI execution, file system operations, and tree views.webview-ui/: The Frontend UI (React 18, Vite, Tailwind CSS). Handles the visual builder and Docker Hub dashboard.
- Clone the repository:
git clone https://github.com/haoz20/dockforge-vscode-extension.git cd dockforge-vscode-extension
