A Docker Desktop Extension that automatically handles AWS MFA authentication and injects credentials into Docker containers.
Stable. Published on Docker Hub as quinnjr/docker-aws-mfa. Supports amd64 and arm64 architectures.
| Component | Technology |
|---|---|
| Backend | Go 1.24 (Alpine, static binary) |
| UI | Angular 21 (Docker Desktop dashboard tab) |
| CLI | Go (cross-compiled for macOS, Linux, Windows) |
| Build | Docker multi-stage, buildx multi-arch |
| Package manager | pnpm 9 (UI) |
| License | MIT |
- Visual Dashboard: Manage AWS MFA credentials directly from Docker Desktop
- Multi-Profile Support: Handle multiple AWS profiles with MFA
- Auto-Expiry Tracking: See credential expiration status at a glance
- CLI Integration: Full CLI tool for terminal workflows
- Docker Integration: Inject credentials into
docker runanddocker compose
Search for "AWS MFA" in the Docker Desktop Extensions marketplace and click Install.
docker extension install quinnjr/docker-aws-mfa:latestgit clone https://github.com/quinnjr/docker-plugin-aws.git
cd docker-plugin-aws
make installAWS CLI configured with MFA serial in ~/.aws/config:
[default]
region = us-west-2
mfa_serial = arn:aws:iam::123456789012:mfa/username
[profile myprofile]
region = us-east-1
mfa_serial = arn:aws:iam::987654321098:mfa/username- Open Docker Desktop
- Click on "AWS MFA" in the left sidebar
- Select your AWS profile
- Enter your MFA token code
- Click "Login with MFA"
Your credentials will be cached and shown in the dashboard.
The extension also installs a CLI tool:
# Authenticate with MFA
docker aws login
docker aws login -p myprofile
# Check status
docker aws status
docker aws status -a # All profiles
# Export credentials
docker aws env -o ./aws.env
eval $(docker aws env --export)
# Run containers with AWS credentials
docker aws run -- -it amazon/aws-cli s3 ls
docker aws run -p myprofile -- myimage:latest
# Docker Compose with credentials
docker aws compose -- up -d
docker aws compose -p myprofile -- logs -fmake build
make installmake devmake logsmake build-cross
make push- Build multi-architecture image:
make build-cross - Push to Docker Hub:
make push - Submit to Docker Extension Marketplace
docker-plugin-aws/
├── backend/ # Go backend (AWS STS operations)
│ ├── main.go # HTTP handlers + AWS MFA logic
│ ├── proxy.go # Docker VM socket proxy
│ ├── go.mod
│ └── go.sum
├── ui/ # Angular frontend (Docker Desktop tab)
│ └── src/
├── Dockerfile # Multi-stage build (Go + Angular + CLI)
├── docker-compose.yaml # Docker Desktop VM service
├── metadata.json # Extension metadata (UI, VM, CLI binaries)
├── entrypoint.sh # Container entry point
├── Makefile # Build automation
├── install.sh # Local installation script
├── install-remote.sh # Remote installation script
└── screenshots/ # Documentation screenshots
- Backend: Go service running in Docker Desktop VM handles AWS STS calls
- UI: React dashboard communicates with backend via Docker Extension API
- CLI: Binary installed on host for terminal workflows
- Caching: Credentials cached in
~/.docker/aws-mfa-cache/with auto-expiry
| Repo | Relationship |
|---|---|
aws-local |
Local AWS service emulator (separate concern -- no MFA needed) |
lexmata-infrastructure |
Pulumi AWS infrastructure that requires MFA-authenticated credentials |
MIT License - see LICENSE
