atmos devcontainer
Use this command to manage development containers (devcontainers) for your Atmos workflows.
Devcontainers provide isolated, reproducible development environments with all required tools and dependencies pre-configured.
Configure Devcontainers
Learn how to configure devcontainers in your atmos.yaml, including runtime selection, mounts, environment variables, and container specifications.
Prerequisites
Container Runtime Required
Atmos devcontainers require either Docker or Podman to be installed and running on your system.
- Docker
- Podman
Installation
- macOS
- Windows
- Linux
Install Docker Desktop for Mac
# Or via Homebrew
brew install --cask docker
Start Docker Desktop from Applications or Launchpad.
Install Docker Desktop for Windows
Start Docker Desktop from the Start menu.
Install Docker Engine for your distribution.
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
# Fedora/RHEL
sudo dnf install docker-ce docker-ce-cli containerd.io
# Start and enable Docker
sudo systemctl start docker
sudo systemctl enable docker
Verification
docker --version
docker ps
Installation
- macOS
- Windows
- Linux
brew install podman
Or install Podman Desktop for GUI management.
Initialize and start Podman machine:
podman machine init
podman machine start
Install Podman Desktop for Windows
Initialize and start Podman machine:
podman machine init
podman machine start
# Ubuntu/Debian
sudo apt-get install podman
# Fedora/RHEL
sudo dnf install podman
# Arch
sudo pacman -S podman
Note: Podman runs rootless on Linux - no daemon required.
Verification
podman --version
podman ps
Runtime Selection
Atmos automatically detects the available container runtime:
- Checks for Docker first
- Falls back to Podman if Docker is unavailable
- You can override with
ATMOS_CONTAINER_RUNTIME=dockerorATMOS_CONTAINER_RUNTIME=podman
Usage
atmos devcontainer <subcommand> [options]
Subcommands
📄️ attach
Attach to a running devcontainer
📄️ config
Show devcontainer configuration
📄️ exec
Execute a command in a running devcontainer
📄️ list
List available devcontainers
📄️ logs
Show logs from a devcontainer
📄️ rebuild
Rebuild a devcontainer from scratch
📄️ remove
Remove a devcontainer
📄️ shell
Launch a shell in a devcontainer
📄️ start
Start a devcontainer
📄️ stop
Stop a running devcontainer
Container Runtimes
Atmos supports both Docker and Podman as container runtimes:
- Auto-detection: Atmos automatically detects the available runtime (Docker first, then Podman)
- Explicit selection: Set
ATMOS_CONTAINER_RUNTIME=dockerorATMOS_CONTAINER_RUNTIME=podman - Per-devcontainer: Configure runtime in
atmos.yamlunderdevcontainer.<name>.settings.runtime
Configuration
Devcontainers are configured in atmos.yaml under the devcontainer section:
components:
devcontainer:
<name>: # Choose any name for your devcontainer (e.g., geodesic, terraform, python)
settings:
runtime: podman # Optional: docker, podman, or omit for auto-detect
spec: !include devcontainer.json
Example with geodesic:
components:
devcontainer:
geodesic:
spec: !include devcontainer.json
The <name> is a user-defined identifier you choose for your devcontainer. Use it with commands like atmos devcontainer start <name>.
The spec field follows the VS Code Dev Container specification.
Output Masking
Devcontainer commands support Atmos's automatic secret masking system with some limitations:
Masking Support:
- ✅
logs- Masking enabled by default - ✅
exec- Masking enabled by default for non-interactive commands - ⚠️
attach/shell- Masking requires experimental--ptyflag (macOS/Linux only)
Interactive Sessions:
Interactive TTY sessions (attach, shell) cannot mask output in standard mode due to TTY limitations. To enable masking in interactive sessions:
# Enable masking in interactive sessions (experimental, macOS/Linux only)
atmos devcontainer attach geodesic --pty
atmos devcontainer shell geodesic --pty
The --pty flag is experimental and not available on Windows. Standard attach/shell mode works on all platforms but cannot mask output in interactive TTY sessions.
For complete masking configuration (patterns, options, use cases), see the Secret Masking Configuration documentation.
Examples
# List all devcontainers
atmos devcontainer list
# Start a devcontainer
atmos devcontainer start geodesic
# Start and attach in one command
atmos devcontainer start geodesic --attach
# Attach to a running devcontainer
atmos devcontainer attach geodesic
# Show logs
atmos devcontainer logs geodesic
# Rebuild a devcontainer
atmos devcontainer rebuild geodesic
# Stop a devcontainer
atmos devcontainer stop geodesic
# Remove a devcontainer
atmos devcontainer remove geodesic
See Also
- Devcontainer Configuration — Configure devcontainers in
atmos.yaml - Dev Container Specification — Official Dev Container spec
- Atmos Components — Learn about Atmos components