GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - devcontainer-config/features: A set of devcontainer features for better developer experience setting up devcontainers.

BranchesTags
Open more actions menu

Latest commit

 

History

123 Commits
123 Commits

Folders and files

NameName
Last commit message
Last commit date
.config
.config
 
 
.devcontainer
.devcontainer
 
 
.github/workflows
.github/workflows
 
 
features
features
 
 
scripts
scripts
 
 
Directory.Build.props
Directory.Build.props
 
 
LICENSE
LICENSE
 
 
ReadMe.md
ReadMe.md
 
 
Workspace.proj
Workspace.proj
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

Devcontainer Features for Devcontainer Configurations

CI Badge

A set of devcontainer features for better developer experience setting up devcontainers.

user-init

Most base images for devcontainers comes with a non-root user with UID 1000. This feature renames that user to remoteUser in devcontainer.json and sets up XDG base directories.

A non-root user can be created via the ghcr.io/devcontainers/features/common-utils feature, but it cannot override an existing user with UID 1000. A UID 1000 user in devcontainer is necessary for sensible file permission behavior in the host.

According to Docker behavior, directories mounted as named volumes are owned by root, unless created up-front with the correct ownership. This feature creates XDG base directories for remoteUser so that they have the correct ownership when mounted as named volumes.

Use cases:

  • A more neutral user name other than vscode or node.
  • Mount XDG base directories to named volumes so that they are persisted across devcontainer rebuilds.

Example usage:

  • devcontainer.json

  • compose.yaml

dot-config

Most tools, CI providers, and even Devcontainer itself expects configuration files to be located in the project root. This feature works around this limitation by performing two-way file synchronization between files under .config/ and the parent directory of the project root (inside the devcontainer), which should be /workspaces by default.

The feature takes a configuration file .devcontainer/dot-config.json, and maps .config/${key}/file to specified absolute path, or path relative the parent directory of the project root.

Example

Use cases:

  • Avoid cluttering the Git project root with configuration files.
  • The parent directory of the project root can be mounted as a named volume, providing persistence across rebuild and better IO performance for some artifacts like build/, node_modules/, etc.

Notes:

  • The choice of the .config/ directory comes from the default value ${HOME}/.config of XDG_CONFIG_HOME.
  • In the view of affected tools, the project root becomes the parent directory of the Git project root, some adjustments in usage may be required.

About

A set of devcontainer features for better developer experience setting up devcontainers.

Topics

configconfigurationdevcontainerdevcontainer-featuredevcontainer-featuresdevcontainersdotdot-config

Resources

Readme
GPL-3.0 license
Activity
Custom properties

Stars

3 stars

Watchers

0 watching

Forks

10 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.