This a collection of dev container features we use at Adaptavist that didn't already exist.
This installs the Atlassian Forge CLI globally via npm.
Example devcontainer.json:
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/adaptavist/devcontainer-features/atlassian-forge:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"containerEnv": {
"FORGE_API_TOKEN": "${localEnv:FORGE_API_TOKEN}",
"FORGE_EMAIL": "${localEnv:FORGE_EMAIL}"
}
}
You'll need to login to forge, which can be done manually within the container
using forge login,
or you can set FORGE_API_TOKEN
and FORGE_EMAIL
locally (to be inherited by
the container).
To check your login:
$ forge whoami
If you want to make use of forge tunnel, you'll need to add the docker-in-docker feature as shown in the example devcontainer.json above.