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

Schedule PostgreSQL Backups with IBM Cloud Code Engine

Docker Disk Space Management — Tips for Managing Resources

A quick guide to service mesh

Why you should learn Apache Kafka

Logo of Apache Kafka