Post

Devcontainer CLI cookbook

Devcontainer CLI cookbook

Installation

Reference

Available Dev Container Templates

Reference

Setting up new Python project

Create configuration directory

1
2
3
devcontainer templates apply \
    --workspace-folder . \
    --template-id ghcr.io/devcontainers/templates/python:3.1.0

Spinning up new devcontainer

1
devcontainer up

Specify certain container name

Add following line to the devcontainer.json file ↓

1
2
3
{
    "runArgs": ["--name", "alpha"]
}

Add Dockerfile

Reference

Attach to running container

1
2
3
docker exec \
    --interactive \
    --tty alpha /bin/bash
This post is licensed under CC BY 4.0 by the author.