A Docker Desktop Extension that automatically handles AWS MFA authentication and injects credentials into Docker containers.
- 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 for AWS operations
│ └── main.go
├── ui/ # React frontend
│ └── src/
│ ├── App.tsx
│ └── main.tsx
├── Dockerfile # Multi-stage build
├── metadata.json # Extension metadata
└── Makefile # Build automation
- 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
MIT License - see LICENSE
