SupportDevcontainer codespaces

Dev Container/GitHub Codespaces (beta)

The only products currently officially supported in Dev Containers is Scripts.

This feature is currently in beta. If you have any issues, please open an issue.

Installation

1. Add feature to your devcontainer.json

Add the ghcr.io/withfig/features/fig:1 feature to your devcontainer.json file.

Example
{
  "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
  "features": {
    "ghcr.io/withfig/features/fig:1": {}
  }
}

2. Authentication

To authenticate it is recommended to use a Fig token otherwise you will have to login every time you start your Dev Container.

You can get a Fig token by running fig user tokens new in a terminal where you are already logged in, for example in the terminal of your local machine.

Then, add the token to your secrets in your Dev Container, for GitHub go to your Codespaces settings and add the token as FIG_TOKEN.

Codespace Secrets

Generating a token via the Dashboard is coming soon.

3. Start your Dev Container

Start your Dev Container and you should be good to go!

You can now run fig run in your Dev Container to execute any script you have.

Troubleshooting

If you have any issues, please open an issue