Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Docker LensNew to Visual Studio Code? Get it now.
Docker Lens

Docker Lens

vitalivu992

|
1 install
| (0) | Free
Browse and manage Docker hosts, containers, images, networks, volumes, Compose projects, and Swarm clusters — inspired by Portainer.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Docker Explorer for VS Code

Browse and manage Docker hosts right from the editor — containers, images, networks, volumes, Compose projects, and Swarm clusters. Portainer-style management that stays editor-native: an activity-bar tree, editor-tab webviews for logs/inspect/dashboard, and a terminal for interactive shells.

Inspired by Portainer CE; built on dockerode.

Features

  • Multiple saved connections — local Unix socket or remote TCP (with optional TLS). Name, tag, and color-code each connection.
  • Projection view over each host:
    • Containers (running/exited/paused/created), with lifecycle actions, logs, inspect, stats, top, shell, and commit.
    • Images (pull, build, tag, push, remove, prune, inspect).
    • Networks (create, connect/disconnect containers, remove, prune, inspect).
    • Volumes (create, remove, prune, inspect).
  • Compose projects discovered via docker compose ls and container labels, with deploy / down / ps / logs / pull / restart.
  • Swarm clusters (shown when the host is an active swarm manager): services (scale, update image, logs, tasks), nodes (set availability), secrets and configs (view/remove).
  • Log viewer webview with follow mode, tail size, timestamps, ANSI colors, copy, clear, and a client-side search filter.
  • JSON inspector panel with collapsible top-level sections and "Open raw".
  • Host dashboard webview: engine/API version, OS/arch, CPU/memory, container counts, and per-container CPU%/memory stats.
  • Read-only mode per connection — safe for production hosts.
  • Free tier: 5 connections; Pro unlocks unlimited connections.

Getting started

  1. Install the extension from the Marketplace / VSIX.
  2. Open the Docker Explorer activity-bar view.
  3. Click Add Connection (dockerExplorer.addConnection), pick Local (Unix socket) or TCP, and follow the prompts.
  4. Right-click the connection → Connect / Test to ping the daemon and show engine
    • API versions.
  5. Expand Containers / Images / Networks / Volumes (and, when active, Compose Projects and Swarm).

Connection setup

Local (Unix socket)

  • Default socket path is /var/run/docker.sock; override with a custom path (e.g. a rootless Docker socket like /run/user/1000/docker.sock).
  • DOCKER_HOST support: if you already run with DOCKER_HOST set, the bundled host parser understands unix:///path/to/socket and tcp://host:port values (also npipe://… on Windows — reported as unsupported on Linux).

TCP (remote host)

  • Host — IP or hostname of the remote Docker daemon.

  • Port — 2375 for plain HTTP, 2376 for HTTPS/TLS.

  • When port 2376 is chosen, TLS is enabled and you are asked for three files:

    • CA certificate path (ca.pem)
    • Client certificate path (cert.pem)
    • Client key path (key.pem)
  • The extension reads the file paths and loads the certificate contents at connect time. Only paths are stored — key material/passphrases are never persisted.

  • Minimal remote daemon setup (/etc/docker/daemon.json):

    {
      "tls": true,
      "tlscacert": "/etc/docker/ca.pem",
      "tlscert": "/etc/docker/server-cert.pem",
      "tlskey": "/etc/docker/server-key.pem",
      "hosts": ["tcp://0.0.0.0:2376", "unix:///var/run/docker.sock"]
    }
    

Read-only mode

  • Each connection has an optional read-only flag.
  • Important: the flag only applies when it is explicitly set to true. An absent flag means read-write (the opposite of some other explorers).
  • Read-only connections reject every mutating command (start/stop/remove/prune/deploy/scale, …) with Connection "<name>" is read-only. — the tree description shows read-only.

Tags, colors & filters

  • Tag connections and use Filter by Tag to focus the tree; Clear Tag Filters resets.
  • Set a custom hex color per connection for quick visual scanning.

Compose

Compose operations run against the local Docker daemon via the docker compose CLI (the compose files live on the same host); remote/TCP connections get disabled compose menu items.

  • Deploy: right-click a connection → Deploy Compose Project (dockerExplorer.composeDeploy) → choose a *.yml/*.yaml file → the file is validated with docker compose config --quiet → confirm → docker compose -f <file> -p <name> up -d. Output streams to the output channel Docker Explorer: Compose.
  • Project operations (right-click a project): Down, PS, Logs, Pull, Restart.
  • Projects come from docker compose ls --format json merged with containers labelled com.docker.compose.project. The Compose Projects group is hidden when empty.

Swarm

The Swarm group only appears when the connected host reports LocalNodeState: active (i.e. it is a swarm manager). Swarm actions use the Engine API:

  • Services — Scale Service (replicas), Update Service Image (with one retry on version conflicts), Service Logs, List Service Tasks.
  • Nodes — Set Node Availability (active/pause/drain; draining requires a persistent confirmation).
  • Secrets / Configs — inspect and remove (creation is on the roadmap).
  • Swarm Inspect — open the raw swarm object in the inspector panel.

Commands

All commands are prefixed dockerExplorer. (~60 total):

Area Commands
Connections add, edit, duplicate, delete, connect/test, refresh, diagnostics, add/remove tag, filter by tag, clear filters, set color
Containers start, stop, restart, pause, unpause, kill, remove, logs, inspect, stats, top, shell, commit, prune
Images pull, build, tag, push, remove, prune, inspect
Networks create, connect, disconnect, remove, prune, inspect
Volumes create, remove, prune, inspect
Compose deploy, down, ps, logs, pull, restart, refresh
Swarm service scale, update image, logs, ps; node availability; secret/config remove; swarm inspect
Host dashboard, prune all

Keybindings: Ctrl+Alt+D opens a container shell, Ctrl+Alt+L opens container logs.

Configuration

Setting Default Description
dockerExplorer.defaultLogTail 200 Default log lines (tail) shown when a log panel opens
dockerExplorer.defaultLogTimestamps false Show timestamps in log output
dockerExplorer.ansiColors true Render ANSI color codes in logs
dockerExplorer.composeOutputChannel true Route compose output to a dedicated channel
dockerExplorer.statsSampleCount 1 Consecutive CPU/memory samples averaged for stats
dockerExplorer.confirmDestructive true Modal confirmation before destructive operations

License & Pro

Docker Explorer is MIT-licensed open-source software with a freemium model.

  • Free tier: up to 5 saved connections.
  • Pro: unlimited connections. Pro is unlocked with a license key signed by the publisher (dockerExplorer.activateLicense, or remove with dockerExplorer.deactivateLicense; see License Info).
  • Buy a Pro license at https://linhvu.net/pricing and enter the key to unlock unlimited Docker hosts.

Roadmap

  • SSH-tunnel connections (use TCP + TLS today for secure remote access)
  • Kubernetes clusters
  • Registry authentication management (push to private registries with login)
  • Volume file browser
  • Dev Containers / container attach

Development

npm install
npm run build        # esbuild bundle → dist/extension.js
npm run typecheck    # tsc --noEmit
npm run lint         # eslint
npm test             # unit tests (node --test on dist/**/*.test.js)
npx tsc -p .         # per-module dist output (required before integration tests)
xvfb-run -a node run-tests.js   # integration tests (@vscode/test-electron)
npx @vscode/vsce package        # build the VSIX

See PLAN.md for architecture notes.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft