Git Product home page Git Product logo

features's Introduction

Development Container Features

devcontainers organization logo Development Container 'Features'
A set of simple and reusable Features. Quickly add a language/tool/CLI to a development container.

'Features' are self-contained units of installation code and development container configuration. Features are designed to install atop a wide-range of base container images (this repo focuses on debian based images).

Missing a CLI or language in your otherwise perfect container image? Add the relevant Feature to the features property of a devcontainer.json. A tool supporting the dev container specification is required to build a development container.

You may learn about Features at containers.dev, which is the website for the dev container specification.

Usage

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.
"features": {
    "ghcr.io/devcontainers/features/go:1": {
        "version": "1.18"
    },
    "ghcr.io/devcontainers/features/docker-in-docker:1": {
        "version": "latest",
        "moby": true
    }
}

The :latest version annotation is added implicitly if omitted. To pin to a specific package version (example), append it to the end of the Feature. Features follow semantic versioning conventions, so you can pin to a major version :1, minor version :1.0, or patch version :1.0.0 by specifying the appropriate label.

"features": {
    "ghcr.io/devcontainers/features/go:1.0.0": {
        "version": "1.18"
    }
}

The devcontainer CLI reference implementation (or a supporting tool) can be used to build a project's dev container declaring Features.

git clone <my-project-with-devcontainer>
devcontainer build --workspace-folder <path-to-my-project-with-devcontainer>

Repo Structure

.
├── README.md
├── src
│   ├── dotnet
│   │   ├── devcontainer-feature.json
│   │   └── install.sh
│   ├── go
│   │   ├── devcontainer-feature.json
│   │   └── install.sh
|   ├── ...
│   │   ├── devcontainer-feature.json
│   │   └── install.sh
├── test
│   ├── dotnet
│   │   └── test.sh
│   ├── go
|   |   ├── scenarios.json
|   |   ├── test_scenario_1.json
│   |   └── test.sh
|   ├── ...
│   │   └── test.sh
...
  • src - A collection of subfolders, each declaring a Feature. Each subfolder contains at least a devcontainer-feature.json and an install.sh script.
  • test - Mirroring src, a folder-per-feature with at least a test.sh script. The devcontainer CLI will execute these tests in CI.

Contributions

Creating your own collection of Features

The Feature distribution specification outlines a pattern for community members and organizations to self-author Features in repositories they control.

A template repo devcontainers/feature-template and GitHub Action are available to help bootstrap self-authored Features.

We are eager to hear your feedback on self-authoring! Please provide comments and feedback on spec issue #70.

Contributing to this repository

This repository will accept improvement and bug fix contributions related to the current set of maintained Features.

features's People

Contributors

aureliojargas avatar bamurtaugh avatar chuxel avatar cwndrws avatar danielbraun89 avatar edgonmsft avatar eitsupi avatar exil0867 avatar github-actions[bot] avatar italypaleale avatar jkeech avatar joshspicer avatar jpogran avatar jungaretti avatar kklopfenstein avatar lucasfcnunes avatar oleksis avatar prenone avatar samruddhikhandale avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.