Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Docker Builder ProNew to Visual Studio Code? Get it now.
Docker Builder Pro

Docker Builder Pro

keroloszakaria

|
31 installs
| (0) | Free
Build Docker images directly from VS Code using client-based environments.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Docker Builder Pro

Build Docker images for your project with one click, using client-based environment files.

Version VS Code License

Features

  • One-Click Docker Builds: Build Docker images directly from VS Code
  • Client-Based Environments: Support for multiple client configurations using environment files
  • Docker Context Management: Automatic detection and switching of Docker contexts
  • Build Script Support: Use custom build scripts or fall back to Docker CLI
  • Project Configuration: Optional .docker-builder-pro.json for project-specific settings
  • Real-Time Logging: Stream build output to VS Code Output Channel

Requirements

  • Docker Desktop or Docker Engine installed
  • Docker CLI available in PATH
  • Docker Compose (optional but recommended)
  • VS Code 1.85.0 or higher

Installation

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "Docker Builder Pro"
  4. Click Install

Or install from VSIX:

code --install-extension docker-builder-pro-1.0.0.vsix

Commands

Access commands via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):

Docker Builder Pro: Validate Docker Setup

Validates your Docker installation:

  • Checks Docker CLI availability
  • Checks Docker Compose availability
  • Lists Docker contexts
  • Detects context mismatches
  • Offers automatic context switching

Docker Builder Pro: Build Image

Builds a Docker image with client-specific configuration:

  1. Detects project structure (Dockerfile, docker-compose.yml, .env.docker)
  2. Prompts for client name (e.g., "client1", "production")
  3. Prompts for version (default: v1.0.0)
  4. Creates client-specific environment file (.env.docker.client1)
  5. Executes build via script or Docker CLI
  6. Streams logs to Output Channel

Project Configuration

Create a .docker-builder-pro.json file in your project root:

{
  "defaultEnv": ".env.docker",
  "buildScript": "scripts/docker-build.ps1",
  "dockerContext": "desktop-linux",
  "tagPattern": "{client}-{version}"
}

Configuration Options

Option Description Default
defaultEnv Base environment file name .env.docker
buildScript Path to custom build script scripts/docker-build.ps1
dockerContext Expected Docker context desktop-linux
tagPattern Image tag pattern {client}-{version}
dockerfile Dockerfile path Dockerfile
composeFile Docker Compose file path docker-compose.yml

Tag Pattern Placeholders

  • {client} - Client name from user input
  • {version} - Version from user input

Examples:

  • {client}-{version} → client1-v1.0.0
  • myapp-{client}-{version} → myapp-client1-v1.0.0
  • {client}/{version} → client1/v1.0.0

Build Script

If you have a custom build script at scripts/docker-build.ps1, the extension will use it:

# scripts/docker-build.ps1
param(
    [Parameter(Mandatory=$true)]
    [string]$EnvFile,

    [Parameter(Mandatory=$true)]
    [string]$Tag
)

Write-Host "Building Docker image: $Tag"
Write-Host "Using environment file: $EnvFile"

# Your custom build logic here
docker compose --env-file $EnvFile build
docker tag myapp:latest myapp:$Tag

Write-Host "Build complete!"

The extension calls the script with:

./scripts/docker-build.ps1 -EnvFile ".env.docker.client1" -Tag "client1-v1.0.0"

If no build script exists, the extension falls back to Docker CLI:

docker compose --env-file ".env.docker.client1" build
# or
docker build -t "client1-v1.0.0" .

VS Code Settings

Configure extension defaults in VS Code settings:

{
  "dockerBuilderPro.defaultEnvFile": ".env.docker",
  "dockerBuilderPro.defaultDockerContext": "desktop-linux",
  "dockerBuilderPro.showOutputOnBuild": true
}

Project Structure Example

my-project/
├── .docker-builder-pro.json    # Extension configuration
├── .env.docker                  # Base environment file
├── .env.docker.client1          # Generated client env file
├── Dockerfile                   # Docker build file
├── docker-compose.yml           # Docker Compose file
├── scripts/
│   └── docker-build.ps1        # Custom build script
└── src/
    └── ...                      # Your application code

Troubleshooting

Docker not found

Error: "Docker is not installed or not in PATH"

Solution:

  1. Install Docker Desktop from https://docker.com
  2. Ensure Docker is running
  3. Restart VS Code after installation

Context mismatch

Warning: "Docker context is 'default', expected 'desktop-linux'"

Solution:

  • Click "Yes, Switch Context" when prompted
  • Or manually run: docker context use desktop-linux

Build script not found

If your build script isn't being detected:

  1. Ensure the script is at the path specified in config
  2. Default path is scripts/docker-build.ps1
  3. Script must be executable

Permission denied (Linux/Mac)

Make your build script executable:

chmod +x scripts/docker-build.ps1

Output Channel

View detailed logs in the Output panel:

  1. Open Output panel (View → Output)
  2. Select "Docker Builder Pro" from dropdown

Development

Building from Source

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Watch for changes
npm run watch

# Package extension
npm run package

Project Architecture

docker-builder-pro/
├── src/
│   ├── extension.ts              # Main entry point
│   ├── commands/
│   │   ├── validateDocker.ts     # Validate command
│   │   └── buildImage.ts         # Build command
│   ├── services/
│   │   ├── dockerService.ts      # Docker CLI operations
│   │   ├── configService.ts      # Configuration management
│   │   └── fileService.ts        # File system operations
│   ├── utils/
│   │   ├── logger.ts             # Logging utility
│   │   ├── executor.ts           # Command execution
│   │   └── constants.ts          # Constants
│   └── types/
│       └── index.ts              # TypeScript interfaces
├── package.json
├── tsconfig.json
└── README.md

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft