About 10 mins after asking this question I thought of a different approach which is perhaps still a hack, but it avoids having to use the project directory name. I put the VSIX file in the .devcontainer/ directory, and then added a COPY command to the end of my Dockerfile thus:

COPY vscode-cds-1.1.4.vsix /tmp/

and could then specify this neutral path in the extensions property thus:

"extensions": [
        "dbaeumer.vscode-eslint",
        "/tmp/vscode-cds-1.1.4.vsix"
]

This works. Wondering if there's a better way though.

Answer from qmacro on Stack Overflow
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Dev Containers - Visual Studio Marketplace
Extension for Visual Studio Code - Open any folder or repository inside a Docker container and take advantage of Visual Studio Code's full feature set.
🌐
Visual Studio Code
code.visualstudio.com › docs › devcontainers › containers
Developing inside a Container
November 3, 2021 - The Visual Studio Code Dev Containers extension lets you use a container as a full-featured development environment. It allows you to open any folder inside (or mounted into) a container and take advantage of Visual Studio Code's full feature set.
🌐
IBM
ibm.com › docs › en › devops-loop › 2.0.0
Loading extensions from local .vsix files
Using Code, you can install and activate extensions in an offline or air-gapped environment by loading them from local .vsix files specified in the dev container configuration.
🌐
Development Containers
containers.dev › supporting
Supporting tools and services
Visual Studio added dev container support in Visual Studio 2022 17.4 for C++ projects using CMake Presets. It is part of the Linux and embedded development with C++ workload, so make sure it is selected in your VS installation.
🌐
GitHub
docs.github.com › codespaces › setting-up-your-project-for-codespaces › introduction-to-dev-containers
Introduction to dev containers - GitHub Docs
The configuration files for a dev container are contained in a .devcontainer directory in your repository. You can use Visual Studio Code to add configuration files for you. You can choose from a selection of predefined configurations for various project types.
🌐
Ken Muse
kenmuse.com › blog › implementing-private-vs-code-extensions-for-dev-containers
Implementing Private VS Code Extensions for Dev Containers - Ken Muse
September 20, 2024 - It relies on a vsix file, which is the packaged, distributable extension. It’s worth knowing that there is an additional --force parameter that can be used to upgrade an installed extension. It’s also important to mention that upgrading or uninstalling extensions after VS Code has launched may require you to reload the window or the extension host. The customizations.extensions property of the container lets you define which extensions should be auomatcally installed as part of the dev container.
Find elsewhere
🌐
Medium
medium.com › versent-tech-blog › introduction-to-dev-containers-4c01cb1752a0
Introduction to Dev Containers. An introduction to Dev Containers in… | by Mathew Hemphill | Versent Tech Blog | Medium
June 19, 2024 - In short, a Dev Container allows you to set up a development environment and tooling within a docker container and interact with that container via VS Code, just as you would a workspace hosted on your own laptop.
🌐
Aspire
aspire.dev › get-started › dev-containers
Dev Containers in Visual Studio Code | Aspire
To configure Dev Containers in Visual Studio Code, use the .devcontainer/devcontainer.json file in your repository. The simplest way to get started is by creating a new repository from the Aspire Dev Container template.
🌐
Rancher Desktop
docs.rancherdesktop.io › vs code remote containers
VS Code Remote Containers | Rancher Desktop Docs
The [Visual Studio Code Remote - Containers] extension lets you use a Docker container as a full-featured development environment, which helps ensure a consistent environment across developer machines and makes it easy for new team members and contributors to get up and running.
🌐
HCL Software
help.hcl-software.com › devops › loop › 2.0.0 › docs › code › code_administrator_guide.html
Configuring dev containers
See Loading extensions from local .vsix files.You can also download a sample file here: devcontainer.json · Refer to the Dev Container metadata reference guide to include JSON metadata related to general settings, Docker or Docker Compose-specific options, and tool-specific properties for configuring a devcontainer.js file.
🌐
Softworx
softworx.at › en › automatic-installation-of-an-extension-in-vscode-from-a-vsix-file-when-starting-a-dev-container
Automatic installation of an extension in VSCode from a *.vsix file when starting a Dev Container
In order to test the extension continuously, I want it to be installed automatically whenever the Dev Container starts. Normally, extensions are listed in devcontainer.json under "customizations": { "vscode": { "extensions": [] }}. However, this only works for extensions from the Marketplace – not for local .vsix files.
🌐
Visual Studio Code
code.visualstudio.com › docs › devcontainers › tutorial
Dev Containers tutorial
November 3, 2021 - Explore Agentic Development - Join a GitHub Copilot Dev Day near you! ... This tutorial walks you through running Visual Studio Code in a Docker container using the Dev Containers extension.
🌐
Lohr Dev
blog.lohr.dev › launching-dev-containers
Reverse engineering Microsoft's dev container CLI
February 11, 2024 - So we downloaded the source code of the dev container extension from the official marketplace: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers. This gives us the ms-vscode-remote.remote-containers-0.320.0.vsix file. Since .vsix is basically just a .zip file, after extracting it we could explore the extension.
🌐
Tibco
docs.tibco.com › pub › flogo-vscode › 1.3.5 › doc › html › install-guide › Extension-with-Dev-Containers.htm
Using the Extension with Visual Studio Code Dev Containers
Based on the configuration and your selections, a .devcontainer folder with a devcontainer.json file and a Dockerfile is built. You are connected to the container environment in Visual Studio Code. Ensure the Linux .vsix installer file of the extension is accessible to the container.
🌐
Medium
medium.com › @fabian1heinrich › vscode-airgapped-devcontainer-e18a97bad0b4
VS Code Air-Gapped Dev Container by Fabian Heinrich | Medium
December 28, 2023 - local .vsix files which where donwloaded in the first step · Press enter or click to view image in full size · Jupyter Notebook running in your air-gapped Dev Container · My repo containing all the code and instructions can be found here: github.com · I hope you enjoyed my first blog post, maybe it can help some of you.
🌐
GitHub
github.com › microsoft › vscode › issues › 176759
Cannot install extensions installed on host into dev container · Issue #176759 · microsoft/vscode
March 10, 2023 - I cannot install extensions that are already installed on my host into dev containers. Installing extensions which are not already installed on the host fails with the same error, but I am presented the option to download manually and I can install directly into the container from VSIX without issue.
Author   daniel-pledge-io
🌐
Docker Hub
hub.docker.com › r › microsoft › vscode-devcontainers
microsoft/vscode-devcontainers - Docker Image
Either create a codespace for your repository⁠ or set up your local machine⁠ for use with the Remote - Containers extension, start VS Code, and open your project folder. Press F1, and select the Add Development Container Configuration Files...