Skip to content

Visual Studio Code devcontainer feature for please

License

Notifications You must be signed in to change notification settings

please-build/devcontainer-feature

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[please.build] Dev Container Feature

By Thought Machine

Description

please.build's Dev Container Feature allows you to include please in Visual Studio Code Dev Containers. This feature ensures access to plz from the terminal and the Please Plugin is installed.

Terms of use

You are free to copy, modify, and distribute [please.build] Dev Container Feature with attributation under the terms of the Apache-2.0 license. See the LICENSE file for details.

Prerequisites

  • Visual Studio Code with Remote Development plugin installed

How to use [please.build] devcontainer feature

  • Add "ghcr.io/please-build/devcontainer-feature/please:1" to "features" in your .devcontainer/devcontainer.json file
  • Run the "Rebuild and Reopen in Container" command

Documentation

Getting support

  • Issues: Report any issues to GitHub

Distributing Features

Marking Feature Public

Note that by default, GHCR packages are marked as private. To stay within the free tier, Features need to be marked as public.

This can be done by navigating to the Feature's "package settings" page in GHCR, and setting the visibility to 'public`. The URL may look something like:

https://github.com/users/<owner>/packages/container/<repo>%2F<featureName>/settings

image

Adding Features to the Index

If you'd like your Features to appear in our public index so that other community members can find them, you can do the following:

This index is from where supporting tools like VS Code Dev Containers and GitHub Codespaces surface Features for their dev container creation UI.

Using private Features in Codespaces

For any Features hosted in GHCR that are kept private, the GITHUB_TOKEN access token in your environment will need to have package:read and contents:read for the associated repository.

Many implementing tools use a broadly scoped access token and will work automatically. GitHub Codespaces uses repo-scoped tokens, and therefore you'll need to add the permissions in devcontainer.json

An example devcontainer.json can be found below.

{
    "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
    "features": {
     "ghcr.io/my-org/private-features/hello:1": {
            "greeting": "Hello"
        }
    },
    "customizations": {
        "codespaces": {
            "repositories": {
                "my-org/private-features": {
                    "permissions": {
                        "packages": "read",
                        "contents": "read"
                    }
                }
            }
        }
    }
}

About

Visual Studio Code devcontainer feature for please

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages