GitHub
github.com › microsoft › vscode-dev-containers › blob › main › containers › ubuntu › .devcontainer › devcontainer.json
vscode-dev-containers/containers/ubuntu/.devcontainer/devcontainer.json at main · microsoft/vscode-dev-containers
November 30, 2023 - See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own! - vscode-dev-containers/containers/ubuntu/.devcontainer/devcontainer.json at main · microsoft/vscode-dev-containers
Author microsoft
GitHub
github.com › devcontainers › features
GitHub - devcontainers/features: A collection of Dev Container Features managed by Dev Container spec maintainers. See https://github.com/devcontainers/feature-starter to publish your own · GitHub
To reference a Feature from this repository, add the desired Features to a devcontainer.json. Each Feature has a README.md that shows how to reference the Feature and which options are available for that Feature. The example below installs the go and docker-in-docker declared in the ./src directory of this repository. See the relevant Feature's README for supported options. "name": "my-project-devcontainer", "image": "mcr.microsoft.com/devcontainers/base:ubuntu", // Any generic, debian-based image.
Starred by 1.4K users
Forked by 590 users
Languages Shell
Docker With WSL 2 Very Slow On Windows 10 (Using VS Code Remote Containers)
You've got layers upon layers of abstraction there. VSCode > WSL2 > Windows > Docker > Docker virtualized linux kernel > Ubuntu. Throw out all that crap and just do VSCode > WSL2 > Ubuntu WSL2 does allow you to do multiple copies of the same OS, so you'll get to the same thing. Nothing against docker, this usage case isn't good for it though (remember docker on windows virtualises a linux kernel in itself) More on reddit.com
vscode devcontainer can't find docker
So I figured out how to solve this.
The dockerPath for the remote container is cached in C:/Users/{username}/AppData/Roaming/Code/CachedConfigurations/user/dev-container+{some number}/configuration.json
This one had the following set:
"remote.containers.dockerPath": "/usr/local/bin/docker"
which I previously set naively. So when the devcontainer was starting it couldn't find the docker specified as this address does not correspond to anything in my case Im guessing (I'm on Windows), so the workspace wasn't mounted.
Changing this to "docker" and restarting the remote container fixes this.
More on reddit.comVideos
05:15
Beginner's Guide to VS Code Dev Containers - The Instant Dev ...
Remote Development with Docker Devcontainers in VS Code - YouTube
06:59
Get Started with Dev Containers in VS Code - YouTube
19:40
How to build your first Devcontainer - YouTube
06:33
Dev Container Features & Lifecycle Hooks - YouTube
GitHub
github.com › devcontainers › features › blob › main › src › node › devcontainer-feature.json
features/src/node/devcontainer-feature.json at main · devcontainers/features
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/node", "description": "Installs Node.js, nvm, yarn, pnpm, and needed dependencies.", "options": { "version": { "type": "string", "proposals": [ "lts", "latest", "none", "22", "20" ], "default": "lts", "description": "Select or enter a Node.js version to install" }, "nodeGypDependencies": { "type": "boolean", "default": true, "description": "Install dependencies to compile native node modules (node-gyp)?"
Author devcontainers
Visual Studio Code
code.visualstudio.com › docs › devcontainers › containers
Developing inside a Container
November 3, 2021 - While you can edit your devcontainer.json file by hand to add a list of extension IDs, you can also right-click on any extension in the Extensions view and select Add to devcontainer.json. If a base image or Feature configures an extension that you do not want installed in your dev container, you can opt out by listing the extension with a minus sign.
Development Containers
containers.dev › implementors › json_reference
Dev Container metadata reference
The focus of devcontainer.json is to describe how to enrich a container for the purposes of development rather than acting as a multi-container orchestrator format. Instead, container orchestrator formats can be referenced when needed to manage multiple containers and their lifecycles.
Ken Muse
kenmuse.com › blog › intro-to-dev-container-features
Intro to Dev Container Features - Ken Muse
January 21, 2023 - Like dev containers, Features only work for Linux (with most features specifically written to support Debian and/or Ubuntu). Behind the scenes, a Feature is just a folder with at least two files: ... The installation point entry script. This code is run during build time to create a layer in the dev container image. This must be executable within the dev container. This is executed as root during the build. ... Metadata about the feature, including options or settings that would normally be configured in devcontainer.json.
Development Containers
containers.dev › implementors › features
Dev Container Features reference
Feature metadata is captured by a devcontainer-feature.json file in the root folder of the feature.
DevPod
devpod.sh › devcontainer.json
devcontainer.json | DevPod docs | DevContainers everywhere
devcontainer.json allows you to reuse certain predefined features within your configuration. You can think of features as reusable Dockerfile parts that will be merged into your Dockerfile upon creation. This makes it easy to reuse functionality such as docker-in-docker or install extra tooling ...
GitHub
github.com › devcontainers › cli
GitHub - devcontainers/cli: A reference implementation for the specification that can create and configure a dev container from a devcontainer.json. · GitHub
Starred by 2.7K users
Forked by 396 users
Languages TypeScript 91.5% | Shell 6.3% | JavaScript 1.2%
Medium
medium.com › cwan-engineering › reproducible-local-development-with-dev-containers-0ed5fa850b36
Reproducible Local Development with Dev Containers | by Clearwater Analytics Engineering | cwan-engineering | Medium
October 19, 2023 - For those not familiar, the “bookworm” part of “java:17-jdk-bookworm” clarifies which version of Ubuntu should be running in the container. Despite this example only illustrating development in Quarkus, it is decently general-purpose and fairly straightforward to extend or transform to meet your needs. There is one interesting major feature that is worth mentioning, in case you have more complex local-development requirements: the build section in the devcontainer.json file supports specifying a docker-compose.yml file as well.
Mamezou
developer.mamezou-tech.com › en › blogs › 2024 › 10 › 11 › devcontainer
【Complete Guide to Devcontainer】Get the Ultimate Modern Development Environment with Docker and WSL! | Mamezou Developer Portal
October 11, 2024 - Some extensions are automatically installed by features, but there's no problem with duplication. ... Many of you might be using a lot of extensions when utilizing VSCode. You might think, "I can't list extensions for each devcontainer" (I thought so). Here's good news for you. In the settings.json of VSCode, if you define the dev.containers.defaultExtensions item as an array and write the extension IDs there, the extensions you always use will be installed from here without needing to write them in devcontainer.json.
Development Containers
containers.dev › supporting
Supporting tools and services
The CLI can take a devcontainer.json and create and configure a dev container from it. It allows for prebuilding dev container configurations using a CI or DevOps product like GitHub Actions. It can detect and include dev container features and apply them at container runtime, and run lifecycle scripts like postCreateCommand, providing more power than a plain docker build and docker run.
GitHub
github.com › devcontainers › feature-starter
GitHub - devcontainers/feature-starter: A bootstrap repo for self-authoring Dev Container Features · GitHub
Starred by 419 users
Forked by 244 users
Languages Shell
GitHub
github.com › devcontainers › templates › blob › main › src › ubuntu › devcontainer-template.json
templates/src/ubuntu/devcontainer-template.json at main · devcontainers/templates
"description": "A simple Ubuntu container with Git and other common utilities installed.", "documentationURL": "https://github.com/devcontainers/templates/tree/main/src/ubuntu", "publisher": "Dev Container Spec Maintainers", "licenseURL": "https://github.com/devcontainers/templates/blob/main/LICENSE", "options": { "imageVariant": { "type": "string", "description": "Ubuntu version (use ubuntu-22.04 or ubuntu-24.04 on local arm64/Apple Silicon):", "proposals": [ "noble", "jammy" ], "default": "noble" } }, "platforms": ["Any"], "optionalPaths": [ ".github/*" ] }
Author devcontainers
Ben Selby
benmatselby.dev › post › vscode-dev-containers
Setting up a VS Code Dev Container · Ben Selby
March 21, 2021 - RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ && apt-get -y install --no-install-recommends \ vim git libzip-dev unzip fzf software-properties-common # Install PHP modules RUN docker-php-ext-install zip # Install gh RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C99B11DEB97541F0 && \ apt-add-repository -u https://cli.github.com/packages && \ apt update && \ apt install gh · This is just to show an example, clearly your packages and dependencies are likely to be different. This settings file let’s you configure VS Code and the way the container runs. It’s named devcontainer.json and is also dropped into the .devcontainer folder in your project.
GitHub
github.com › devcontainers › features › blob › main › src › python › devcontainer-feature.json
features/src/python/devcontainer-feature.json at main · devcontainers/features
A collection of Dev Container Features managed by Dev Container spec maintainers. See https://github.com/devcontainers/feature-starter to publish your own - features/src/python/devcontainer-feature.json at main · devcontainers/features
Author devcontainers
GitHub
docs.github.com › en › codespaces › setting-up-your-project-for-codespaces › configuring-dev-containers › adding-features-to-a-devcontainer-file
Adding features to a devcontainer.json file - GitHub Docs
To make the changes take effect in existing codespaces, you will need to pull the updates to the devcontainer.json file into your codespace, then rebuild the container for the codespace. For more information, see Introduction to dev containers. ... To add features in VS Code while you are working locally, and not connected to a codespace, you must have the "Dev Containers" extension installed and enabled.