You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-17Lines changed: 19 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,22 @@
1
1
# Docker image for ASK and AWS CLI
2
2
3
-
The purpose of this container is to be able to use the [Amazon ASK CLI (Alexa Skills Kit)](https://developer.amazon.com/docs/smapi/ask-cli-intro.html#alexa-skills-kit-command-line-interface-ask-cli) in a Docker container in Devops pipelines.
3
+
The 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.
4
4
5
5
**NOTE:** This is a fork from [martindsouza](https://github.com/martindsouza/docker-amazon-ask-cli) image with these changes:
6
6
1. Image base is the latest LTS version instead of the current version of Node.js.
7
7
2. Added ASK_CLI_VERSION build argument in order to be able to work with different ASK CLI versions.
8
8
3. Added git and zip packages that ASK CLI will use in its commands.
9
9
4. Added Bespoken.
10
-
5. 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.
10
+
5. 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.
11
11
12
12
## ASK Config
13
13
14
-
Before running this example ensure that you've registered for an [Alexa Developer](https://developer.amazon.com/alexa) account.
14
+
You 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.
15
15
16
16
### ask configure
17
17
18
-
Running `ask configure` in v2 and `ask init` in v1 in the container will ask you a set of questions to create the Alexa credentials. Follow all the steps explained in the official documentation[https://developer.amazon.com/en-US/docs/alexa/smapi/manage-credentials-with-ask-cli.html].
18
+
Running `ask configure` in v2 and `ask init` in v1 in the container will ask you a set of questions to create the Alexa credentials.
19
+
Follow all the steps explained in the official documentation[https://developer.amazon.com/en-US/docs/alexa/smapi/manage-credentials-with-ask-cli.html].
19
20
20
21
In 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.
21
22
@@ -39,13 +40,14 @@ If you are using Alexa environment variable you have to add a new profile called
39
40
40
41
## AWS Config
41
42
42
-
If you plan to use [Lambda](https://aws.amazon.com/lambda/) you'll need to configure the AWS CLI. To simplify. You can configure it multiple ways.
43
+
If 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.
43
44
44
45
In 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.
45
46
46
47
### aws configure
47
48
48
-
Running `aws configure` in the container will ask you a set of questions to create the AWS credentials
49
+
For general use, the `aws configure` command is the fastest way to set up your AWS CLI installation.
50
+
When you enter this command, the AWS CLI prompts you for four pieces of information (access key, secret access key, AWS Region, and output format)
49
51
50
52
### Setting credentials using environment variables
51
53
@@ -59,45 +61,45 @@ For more information about the [AWS environment variables](https://docs.aws.amaz
59
61
60
62
## Usage
61
63
62
-
Get the latest version of the container:`docker pull xavidop/alexa-ask-aws-cli`
64
+
Get the latest version of the container:
63
65
64
66
```bash
65
67
# Get image
66
68
docker pull xavidop/alexa-ask-aws-cli
67
69
```
68
70
69
-
They're two ways to use the `ask` cli for this container which are covered below.
71
+
They're two ways to use the `ask` cli for this container described below.
70
72
71
-
### Run One Command
73
+
### Run ASK CLI Commands
72
74
73
-
In this mode the container will start, you run your `ask` command, then the container is stopped and deleted. _Don't worry your Docker image is still kept._
75
+
This is an example that shows up how to execute an `ask` command. After this command is executed, the container will stop.
74
76
75
77
```bash
76
78
docker run -it --rm \
77
79
-v $(pwd)/ask-config:/home/node/.ask \
80
+
-v $(pwd)/ask-config:/home/node/.aws \
81
+
-v $(pwd)/ask-config:/home/node/.bst \
78
82
-v $(pwd)/hello-world:/home/node/app \
79
83
xavidop/alexa-ask-aws-cli:latest \
80
84
ask init -l
81
85
```
82
86
83
-
### Run `bash`, then run `ask`
87
+
### Run ASK CLI Commands interactively
84
88
85
-
In this mode, the container will start, you can then run the container's bash, and the container will stop and delete only once you `exit`.
89
+
In this example, the container will start directly with the bash console and then you can execute there all the ASK CLI commands you want.
0 commit comments