HUB
Sign inSign up
aliyun-cli logo

devopstestlab/aliyun-cli

By devopstestlab

•Updated about 6 years ago

Image
0

1.9K

devopstestlab/aliyun-cli repository overview

⁠docker-aliyun-cli

This repository provides the source files to create a Docker image to run Aliyun CLI commands. It embeds too the Serverless Framework and Node.js.

⁠Build

To build the image:

docker build -t devopstestlab/aliyun-cli .

⁠Usage

To use this Docker image, you should follow two steps:

  • create the credentials file:
docker run -v $PWD/data:/root/.aliyun cli aliyun configure set --profile akProfile --mode AK --region eu-central-1 --access-key-id <ACCESS_KEY_ID> --access-key-secret <ACCESS_KEY_SECRET>

<ACCESS_KEY_ID> and <ACCESS_KEY_SECRET> are the credentials provided by Alibaba Cloud when you create an user with a programmatic access.

A credentials file is created in the ./data/config.json file.

  • execute aliyun-cli command by providing the credentials file:
docker run -v $PWD/data:/root/.aliyun:ro cli aliyun ecs DescribeRegions

It's a choice to store the credentials, with advantages and disadvantages. This way to do is very practical when you don't want to use interactive commands, for example for CI/CD.

Tag summary

Content type

Image

Digest

Size

150.8 MB

Last updated

about 6 years ago

docker pull devopstestlab/aliyun-cli