{"id":15040621,"url":"https://github.com/xavidop/alexa-ask-aws-cli-docker","last_synced_at":"2025-06-25T08:38:03.694Z","repository":{"id":65162363,"uuid":"259020709","full_name":"xavidop/alexa-ask-aws-cli-docker","owner":"xavidop","description":"Docker container for ASK CLI and easy to use in devops pipelines","archived":false,"fork":false,"pushed_at":"2024-07-02T22:16:57.000Z","size":51,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-14T17:52:44.300Z","etag":null,"topics":["alexa","alexa-credentials","alexa-skill","amazon","aws-cli","cli-commands","cli-configuration","cli-searches","devops-pipelines","docker","docker-container","docker-image","github-action","github-actions"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xavidop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"xavidop","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-04-26T12:07:00.000Z","updated_at":"2023-03-10T23:57:18.000Z","dependencies_parsed_at":"2024-11-08T06:04:18.577Z","dependency_job_id":"47b4cd95-3407-4662-80bc-ec24de632241","html_url":"https://github.com/xavidop/alexa-ask-aws-cli-docker","commit_stats":{"total_commits":38,"total_committers":1,"mean_commits":38.0,"dds":0.0,"last_synced_commit":"ff826f22eff6d272d2343b1fcbc2a5f92a916358"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/xavidop/alexa-ask-aws-cli-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavidop%2Falexa-ask-aws-cli-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavidop%2Falexa-ask-aws-cli-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavidop%2Falexa-ask-aws-cli-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavidop%2Falexa-ask-aws-cli-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xavidop","download_url":"https://codeload.github.com/xavidop/alexa-ask-aws-cli-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xavidop%2Falexa-ask-aws-cli-docker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261837295,"owners_count":23217398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alexa","alexa-credentials","alexa-skill","amazon","aws-cli","cli-commands","cli-configuration","cli-searches","devops-pipelines","docker","docker-container","docker-image","github-action","github-actions"],"created_at":"2024-09-24T20:44:50.016Z","updated_at":"2025-06-25T08:38:03.631Z","avatar_url":"https://github.com/xavidop.png","language":"Dockerfile","funding_links":["https://github.com/sponsors/xavidop"],"categories":[],"sub_categories":[],"readme":"# Docker image for ASK and AWS CLI \n\nThe purpose of this container is to be able to use the [Amazon ASK CLI](https://developer.amazon.com/docs/smapi/ask-cli-intro.html#alexa-skills-kit-command-line-interface-ask-cli) and [Amazon AWS CLI](https://docs.aws.amazon.com/cli/index.html) in a Docker container in DevOps pipelines.\n\n**NOTE:** This is a fork from [martindsouza](https://github.com/martindsouza/docker-amazon-ask-cli) image with these changes:\n1. Image base is the latest LTS version instead of the current version of Node.js.\n2. Added ASK_CLI_VERSION build argument in order to be able to work with different ASK CLI versions.\n3. Added git and zip packages that ASK CLI will use in its commands.\n4. Added Bespoken.\n5. Added jq and expect cli commands.\n6. Remove volumes. I think it is not necessary in a simple docker image that I will use in my DevOps pipelines. In addition, you can use '-v' argument in `docker run` command whenever you want.\n\n## ASK Config\n\nYou have to take into account that you have to have an [Alexa Developer](https://developer.amazon.com/alexa) account to be able to work with this container.\n\n### ask configure\n\nRunning `ask configure` in v2 and `ask init` in v1 in the container will ask you a set of questions to create the Alexa credentials. \nFollow all the steps explained in [the official documentation](https://developer.amazon.com/en-US/docs/alexa/smapi/manage-credentials-with-ask-cli.html).\n\nIn either case ensure that you pass in `-v $(pwd)/ask-config:/home/node/.ask \\` (where `$(pwd)/ask-config` is a location on your host machine) as an option when running the container to preserve the ASK configuration.\n\n### Setting credentials using environment variables\n\nYou can store Alexa credentials in environment variables instead of the Alexa credentials file. If the Alexa environment variables exist, ASK CLI uses them instead of the values in the Alexa credentials file. ASK CLI searches for the following Alexa environment variables:\n\nYou can use the ASK CLI environment variables in conjunction with or in addition to the ASK CLI configuration file. The following list describes the ASK CLI environment variables.\n\n* `ASK_DEFAULT_PROFILE`: Use this environment variable in conjunction with the ASK CLI configuration file. When you set the value of this environment variable to one of the profiles in the configuration file, ASK CLI uses the credentials in that profile.\n* `ASK_ACCESS_TOKEN`: Use this environment variable to store an Amazon developer access token. When this environment variable exists, ASK CLI uses it instead of the credentials in the configuration file.\n* `ASK_REFRESH_TOKEN`: Use this environment variable to store an Amazon developer refresh token. When this environment variable exists, ASK CLI uses it instead of the credentials in the configuration file. When this environment variable and ASK_ACCESS_TOKEN both exist, ASK CLI uses this one.\n* `ASK_VENDOR_ID`: Use this environment variable to store an Amazon developer vendor ID. When this environment variable exists, ASK CLI uses it instead of the one it the configuration file.\n* `ASK_CLI_PROXY`: Use this environment variable to specify an HTTP proxy for requests made with the ASK CLI.\n  \nIf you want to know how to get the `ASK_REFRESH_TOKEN` and `ASK_ACCESS_TOKEN`, see [this page](https://developer.amazon.com/en-US/docs/alexa/smapi/get-access-token-smapi.html) in the Alexa documentation.\n\nIf you want to know how to get the `ASK_VENDOR_ID`, you only have to enter to [this page](https://developer.amazon.com/settings/console/mycid).\n\nIf you are using Alexa environment variable you have to add a new profile called `__ENVIRONMENT_ASK_PROFILE__` in your `.ask/config` file\n\n## AWS Config\n\nIf you plan to use [AWS Lambda](https://aws.amazon.com/lambda/) you'll need to configure the AWS CLI. To simplify. You can configure it multiple ways.\n\nIn either case ensure that you pass in `-v $(pwd)/aws-config:/home/node/.aws \\` (where `$(pwd)/aws-config` is a location on your host machine) as an option when running the container to preserve the AWS configuration.\n\n### aws configure\n\nFor general use, the `aws configure` command is the fastest way to set up your AWS CLI installation.\nWhen you enter this command, the AWS CLI prompts you for four pieces of information (access key, secret access key, AWS Region, and output format)\n\n### Setting credentials using environment variables\n\nYou can store AWS credentials in environment variables instead of the AWS credentials file. If the AWS environment variables exist, ASK CLI uses them instead of the values in the AWS credentials file. ASK CLI searches for the following AWS environment variables:\n\n* `AWS_ACCESS_KEY_ID`\n* `AWS_SECRET_ACCESS_KEY`\n  \nFor more information about the [AWS environment variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html), see Environment Variables in the AWS documentation.\n\n\n## Usage\n\nGet the latest version of the container:\n\n```bash\n  # Get image\n  docker pull xavidop/alexa-ask-aws-cli:2.0\n```\n\nThey're two ways to use the `ask` cli for this container described below.\n\n### Run ASK CLI Commands\n\nThis is an example that shows up how to execute an `ask` command. After this command is executed, the container will stop.\n\n```bash\ndocker run -it --rm \\\n  -v $(pwd)/ask-config:/home/node/.ask \\\n  -v $(pwd)/ask-config:/home/node/.aws \\\n  -v $(pwd)/ask-config:/home/node/.bst \\\n  -v $(pwd)/hello-world:/home/node/app \\\n  xavidop/alexa-ask-aws-cli:2.0 \\\n  ask init -l\n```\n\n### Run ASK CLI Commands interactively\n\nIn this example, the container will start directly with the bash console and then you can execute there all the ASK CLI commands you want.\n\n```bash\ndocker run -it --rm \\\n  -v $(pwd)/ask-config:/home/node/.ask \\\n  -v $(pwd)/ask-config:/home/node/.aws \\\n  -v $(pwd)/ask-config:/home/node/.bst \\\n  -v $(pwd)/app/HelloWorld:/home/node/app \\\n  xavidop/alexa-ask-aws-cli:2.0 \\\n  bash\n\n```\n\n## Build and push the image\n\nFor ASK CLI v1:\n```bash\ndocker build --build-arg ASK_CLI_VERSION=1.7.23 -t xavidop/alexa-ask-aws-cli:1.0 .\n\n# Pushing to Docker Hub\n# Note: not required since I have a build hook linked to the repo\ndocker login\ndocker push xavidop/alexa-ask-aws-cli:1.0\n```\n\nFor ASK CLI v2:\n```bash\ndocker build --build-arg ASK_CLI_VERSION=2.15.0 -t xavidop/alexa-ask-aws-cli:2.0 .\n\n# Pushing to Docker Hub\n# Note: not required since I have a build hook linked to the repo\ndocker login\ndocker push xavidop/alexa-ask-aws-cli:2.0\n```\n\n## Versions\n\nCurrently there are the versions available:\n* 1.0: this image is running the latest version of ASK CLI v1 (1.7.23)\n* 2.0: this image is running the latest version of ASK CLI v2 (2.21.0)\n  * 2.12.0: this image is running the 2.12.0 version of ASK CLI\n  * 2.13.0: this image is running the 2.13.0 version of ASK CLI\n  * 2.15.0: this image is running the 2.15.0 version of ASK CLI\n  * 2.21.0: this image is running the 2.21.0 version of ASK CLI\n* latest: this image is running the latest version of ASK CLI (2.21.0)\n\nThese versions are available in my [DockerHub profile](https://hub.docker.com/r/xavidop/alexa-ask-aws-cli/tags)\n\n# GitHub Action\n\nWith the above Docker image a GitHub Action has been created in order to run ASK CLI Commands:\n\nThis GitHub Action is available in the gitHub Actions Marketplace](https://github.com/marketplace/actions/alexa-ask-aws-cli-action)\n\nYou can use the following example as a way to start:\n```yaml\n\n  - name: Alexa ASK AWS CLI Action\n    uses: xavidop/alexa-ask-aws-cli-docker@v1.0.6\n    id: command\n    with:\n      command: 'ask --version'\n    env: # Or as an environment variable\n      ASK_ACCESS_TOKEN: ${{ secrets.ASK_ACCESS_TOKEN }}\n      ASK_REFRESH_TOKEN: ${{ secrets.ASK_REFRESH_TOKEN }}\n      ASK_VENDOR_ID: ${{ secrets.ASK_VENDOR_ID }}\n      AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n      AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n      SKILL_ID: ${{ secrets.SKILL_ID }}\n  # Use the output from the `hello` step\n  - name: Get the output\n    run: echo \"The result was ${{ steps.command.outputs.result }}\"\n\n```\n\nOr for example using it in a workflow:\n\n```yaml\n  on: [push]\n\n  jobs:\n    test-action:\n      runs-on: ubuntu-latest\n      name: Test Action\n      steps:\n        # To use this repository's private action,\n        # you must check out the repository\n        - name: Checkout\n          uses: actions/checkout@v2\n        - name: Test action step\n          uses: xavidop/alexa-ask-aws-cli-docker@v1.0.6\n          id: ask\n          with:\n            command: 'ask --version'\n          env: # Or as an environment variable\n            ASK_ACCESS_TOKEN: ${{ secrets.ASK_ACCESS_TOKEN }}\n            ASK_REFRESH_TOKEN: ${{ secrets.ASK_REFRESH_TOKEN }}\n            ASK_VENDOR_ID: ${{ secrets.ASK_VENDOR_ID }}\n            AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n            AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n            SKILL_ID: ${{ secrets.SKILL_ID }}\n        # Use the output from the `hello` step\n        - name: Get the output\n          run: echo \"The result was ${{ steps.ask.outputs.result }}\"\n\n```\n\nIt is important to add that the GiHub Action are using the latest version of the ASK CLI.\n\n## Links:\n\n- [ASK CLI Quickstart](https://developer.amazon.com/docs/smapi/quick-start-alexa-skills-kit-command-line-interface.html)\n- [ASK CLI Full Doc](https://developer.amazon.com/docs/smapi/ask-cli-intro.html#alexa-skills-kit-command-line-interface-ask-cli)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxavidop%2Falexa-ask-aws-cli-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxavidop%2Falexa-ask-aws-cli-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxavidop%2Falexa-ask-aws-cli-docker/lists"}