
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
The purpose of this container is to be able to use the https://developer.amazon.com/docs/smapi/ask-cli-intro.html#alexa-skills-kit-command-line-interface-ask-cli.
aws configurecredentials and config filebash, then run askask commandsThis example will show you both how to use this container and start a simple HelloWorld Alexa Skill. In this example we'll assume that AWS has been configured see below.
Please read the other sections on how to properly use this container and volume configurations. Before running this example ensure that you've registered for an https://developer.amazon.com/alexa account
bash# Get image docker pull martindsouza/amazon-ask-cli # Create a ASK configuration folders. cd ~ mkdir alexa-demo \ alexa-demo/ask-config \ alexa-demo/aws-config \ alexa-demo/app # Note copy the aws-config information (see below) to the aws-config folder # To help simply writing out a full docker run command each time will use an alias alias alexa="docker run -it --rm \ -v ~/alexa-demo/ask-config:/home/node/.ask \ -v ~/alexa-demo/aws-config:/home/node/.aws \ -v ~/alexa-demo/app:/home/node/app \ martindsouza/amazon-ask-cli:latest " # For windows users you'll need to run the following each time (unless you have an alternative to alias) # docker run -it --rm \ # -v C:/%UserProfile%/alexa-demo/ask-config:/home/node/.ask ^ # -v C:/%UserProfile%/alexa-demo/aws-config:/home/node/.aws ^ # -v C:/%UserProfile%/alexa-demo/app:/home/node/app ^ # martindsouza/amazon-ask-cli:latest ^ # <command> # If using Lambda and want to load your configuration run: # alexa aws configure # # Some parameters to help out: # Region: us-east-1 # Output format: json # Configure ASK alexa ask init --no-browser # ? Please choose one from the following AWS profiles for skill's Lambda function deployment. # default # Chose default and hit enter # # A URL will be printed on screen. Copy and past into your browser # Login using your Amazon Developer account # Copy the code that is shown on the screen and past in the terminal # You should see a success message like: Tokens fetched and recorded in ask-cli config. # Verify profile was created alexa ask init -l # Should return: # Profile Associated AWS Profile # [default] ** NULL ** # Create a new app: alexa ask new --skill-name HelloWorld # New project for Alexa skill created. # This will also create a new folder: ~/alexa-demo/HelloWorld # To create a new app with lambda: # alexa ask new --skill-name HelloWorld --lambda-name hello-world-service # Move the HellowWorld folder back to app directory cd ~/alexa-demo/app/ mv HelloWorld/* . mv HelloWorld/.ask . rmdir HelloWorld # Deploy (all): this will create both lambda and Alexa Skill alexa ask deploy # -------------------- Create Skill Project -------------------- # Profile for the deployment: [default] # Skill Id: amzn1.ask.skill.55cb6762-4b48-433f-adef-2d6074d06c13 # Skill deployment finished. # Model deployment finished. # Lambda deployment finished. # Your skill is now deployed and enabled in the development stage. # Try invoking the skill by saying “Alexa, open {your_skill_invocation_name}” or simulate an invocation via the `ask simulate` command. # Other options are: # alexa ask deploy -t lambda # alexa ask deploy -t skill # alexa ask deploy -t model
If you plan to use https://aws.amazon.com/lambda/ you'll need to configure the AWS CLI. To simplify. You can configure it multiple ways.
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.
aws configureRunning aws configure in the container will ask you a set of questions to create the AWS credentials
credentials and config fileCopy the files in samples/aws-config to your local/host folder that will hold the credentials. You need to modify the credentials file with your aws_access_key_id and aws_secret_access_key at a minimum.
Get the latest version of the container: docker pull martindsouza/amazon-ask-cli
They're two ways to use the ask cli for this container which are covered below. The volume documentation is listed following the examples.
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.
bashdocker run -it --rm \ -v $(pwd)/ask-config:/home/node/.ask \ -v $(pwd)/hello-world:/home/node/app-dev \ martindsouza/amazon-ask-cli:latest \ ask init -l
bash, then run askIn 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.
bashdocker run -it --rm \ -v $(pwd)/ask-config:/home/node/.ask \ -v $(pwd)/app-dev/HelloWorld:/home/node/app-dev \ martindsouza/amazon-ask-cli:latest \ bash # You'll be prompted with: # bash-4.3$ # # Type: exit to end and terminate the container
| Path | Description |
|---|---|
/home/node/.ask | .ask configuration folder for ASK cli |
/home/node/.aws | .aws configuration folder AWS cli |
/home/node/app | folder where your Alexa project is stored |
bashdocker build -t martindsouza/amazon-ask-cli . # Pushing to Docker Hub # Note: not required since I have a build hook linked to the repo # docker login # docker build -t martindsouza/amazon-ask-cli:0.0.1 . # docker push martindsouza/amazon-ask-cli
ask commandsbash# Delete skill alexa ask api delete-skill -s SKILL_ID
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务