Skip to content

VS Code

  1. VS Code
  2. Dev Containers extension (ms-vscode-remote.remote-containers)
  3. Docker or Podman running on your machine (see Getting Started). VS Code Dev Containers also supports Podman as a backend.
Terminal window
git clone https://github.com/f5xc-salesdemos/devcontainer.git
code devcontainer

VS Code detects .devcontainer/devcontainer.json and shows a notification: “Reopen in Container”. Click it, or use the command palette:

Dev Containers: Reopen in Container

VS Code builds (or pulls) the image, starts the container, installs extensions, and opens a terminal inside the container.

The .devcontainer/devcontainer.json file tells VS Code to use Docker Compose:

"dockerComposeFile": ["../docker-compose.yml", "../docker-compose.build.yml"],
"service": "dev",
"workspaceFolder": "/workspace"

The devcontainer config explicitly includes the build file, so VS Code can build the image locally when you use “Reopen in Container” or “Rebuild Container”.

Extensions are installed automatically inside the container:

ExtensionDescription
PythonPython language support
ESLintJavaScript/TypeScript linting
PrettierCode formatting
DockerDockerfile and compose support
TerraformHCL language support
GoGo language support
Rust AnalyzerRust language support
YAMLYAML language support
KubernetesKubernetes manifest support

To add extensions, edit the customizations.vscode.extensions array in .devcontainer/devcontainer.json.

VS Code automatically forwards ports defined in the compose file. The noVNC display is available at http://localhost:6080/vnc.html — VS Code will notify you when the port is ready.

Additional ports can be forwarded on-demand from the Ports panel in VS Code.

If you prefer the command line over the VS Code UI:

Terminal window
npm install -g @devcontainers/cli
devcontainer up --workspace-folder .
devcontainer exec --workspace-folder . zsh

After changing the Dockerfile or compose files:

Dev Containers: Rebuild Container

This rebuilds the image and restarts the container. Named volumes (workspace, home) persist across rebuilds.