⚠️ Maintenance NoticeThis repository is no longer actively maintained. Since its creation, IBM Cloud tools have evolved significantly, and I no longer use IBM Cloud in my daily work. The image may still work, but I won't be providing updates or support.
Consider using IBM Cloud Official Docker Images or the IBM Cloud CLI directly.
- ✅ Zero installation - Comes with IBMCloud CLI and all plugins pre-installed
- ✅ CI/CD ready - Set environment variables and you're ready to go
- ✅ Small footprint - Alpine-based image for minimal size
- ✅ Always up-to-date -
Automatic builds with the latest version(builds paused)
- Quick Start
- Environment Variables
- CI/CD Usage
- Installed Plugins
- Advanced Examples
- Contributing
- License
docker run -it \
-e IBM_CLOUD_API_KEY=$IBM_CLOUD_API_KEY \
-e IBM_CLOUD_REGION=us-south \
oda2/ibmcloud-cliservices:
ibmcloud:
image: oda2/ibmcloud-cli
environment:
IBM_CLOUD_API_KEY: ${IBM_CLOUD_API_KEY}
IBM_CLOUD_REGION: us-south
volumes:
- ./scripts:/scripts
command: /bin/bash| Variable | Required | Description | Default |
|---|---|---|---|
IBM_CLOUD_API_KEY |
✅ | Your IBM Cloud API Key | - |
IBM_CLOUD_REGION |
✅ | Region for login | us-south |
IBM_CLOUD_RESOURCE_GROUP |
❌ | Resource group | default |
🔐 Tip: Never expose your API Key in public repositories! Use CI/CD secrets.
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Login to IBM Cloud
uses: oda2/docker-ibmcloud-cli@v1
with:
api-key: ${{ secrets.IBM_CLOUD_API_KEY }}
region: us-south
- name: List clusters
run: ibmcloud ks cluster lsdeploy:
image: oda2/ibmcloud-cli
variables:
IBM_CLOUD_API_KEY: $IBM_CLOUD_API_KEY
IBM_CLOUD_REGION: us-south
script:
- ibmcloud ks cluster lspipeline {
agent {
docker {
image 'oda2/ibmcloud-cli'
args '-e IBM_CLOUD_API_KEY=$IBM_CLOUD_API_KEY -e IBM_CLOUD_REGION=us-south'
}
}
stages {
stage('Deploy') {
steps {
sh 'ibmcloud ks cluster ls'
}
}
}
}- task: Docker@2
inputs:
command: 'run'
imageName: 'oda2/ibmcloud-cli'
containerCommand: 'ibmcloud ks cluster ls'
envVars: |
IBM_CLOUD_API_KEY=$(IBM_CLOUD_API_KEY)
IBM_CLOUD_REGION=us-south| Plugin | Description |
|---|---|
kubernetes-service |
Kubernetes cluster management (IKS) |
container-registry |
Docker image management in IBM Cloud Container Registry |
schematics |
Infrastructure as Code (IaC) with Terraform |
cloud-object-storage |
Object Storage management |
$ ibmcloud plugin list
Listing installed plug-ins...
Plugin Name Version Status
cloud-object-storage 1.3.1 Update Available
container-registry 0.1.567 Update Available
kubernetes-service 0.3.254 Update Available
schematics 0.0.27 Update Availabledocker run --rm \
-e IBM_CLOUD_API_KEY=$IBM_CLOUD_API_KEY \
-e IBM_CLOUD_REGION=us-south \
oda2/ibmcloud-cli ibmcloud ks cluster ls# Authenticate and get cluster credentials
docker run --rm \
-e IBM_CLOUD_API_KEY=$IBM_CLOUD_API_KEY \
-e IBM_CLOUD_REGION=us-south \
oda2/ibmcloud-cli ibmcloud ks cluster config --cluster my-cluster
# Download kubeconfig
docker run --rm \
-e IBM_CLOUD_API_KEY=$IBM_CLOUD_API_KEY \
-e IBM_CLOUD_REGION=us-south \
-v $(pwd):/output \
oda2/ibmcloud-cli ibmcloud ks cluster config --cluster my-cluster --export > /output/kubeconfigdocker run --rm \
-e IBM_CLOUD_API_KEY=$IBM_CLOUD_API_KEY \
-e IBM_CLOUD_REGION=us-south \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(pwd):/app \
oda2/ibmcloud-cli sh -c "
ibmcloud cr build -t registry.us-south.io/myapp:latest /app
"Contributions are welcome! See our Contribution Guide.
- Fork the project
- Create your branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
