Alibaba Cloud Toolbox — Running CLI in Docker

Prerequisites

  1. A machine with Docker installed. If you don’t know how to do this, please refer to this tutorial.
  2. A working internet connection.

Getting Started

Interactive mode:

docker run -ti aliyunca/aliyuncli-python-toolbox:latest sh

Detached mode:

docker run -dti aliyunca/aliyuncli-python-toolbox:latest sh
# configure the CLI$ aliyuncli configureAliyun Access Key ID [None]: my_access_idAliyun Access Key Secret [None]: mypasswordDefault Region Id [None]:Default output format [None]:# make calls to Aliyun!$ aliyuncli ecsusage: aliyuncli <command> <operation> [options and parameters][ecs] valid operations as follows:ActivateRouterInterface               | AddTags  AllocateEipAddress                     | AllocatePublicIpAddressApplyAutoSnapshotPolicy          | AssociateEipAddressAssociateHaVip                          | AttachDisk....# get some help regarding the functionaliyuncli ecs DescribeImages help
docker run -dti \      -v {Full local folder path}:/root/.aliyuncli \      aliyunca/aliyuncli-python-toolbox:latest sh
docker run -dti \      --env ALI_ACCESS_KEY={API Key} \      --env ALI_ACCESS_SECRET={API Secret} \      --env ALI_DEFAULT_REGION=ap-southeast-1 \      --env ALI_OUTPUT_FORMAT=json \      aliyunca/aliyuncli-python-toolbox:latest sh

Conclusion

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

Debugging Python-Based Microservices Running on a Remote Kubernetes Cluster

KubeVela 1.4 released, Make Application Delivery Safe, Foolproof, and Transparent

Using Instana for Apache HTTPd tracing monitoring and performance management

Build and run microservices with Kubernetes, Helm and Skaffold locally