我想使用以下命令在项目根文件夹中测试我的 hello world lambda 函数, 命令使用 aws-sam-cli:
sam local start-api --debug
这将在控制台中输出以下内容:2018-07-11 16:13:15 local start-api command is called
2018-07-11 16:13:15 2 resources found in the template
2018-07-11 16:13:15 Found Serverless function with name='Hello' and CodeUri='.'
2018-07-11 16:13:15 Trying paths: ['/home/jamiro/.docker/config.json', '/home/jamiro/.dockercfg']
2018-07-11 16:13:15 No config file found
2018-07-11 16:13:15 Trying paths: ['/home/jamiro/.docker/config.json', '/home/jamiro/.dockercfg']
2018-07-11 16:13:15 No config file found
Error: Running AWS SAM projects locally requires Docker. Have you got it installed?
据我了解,我已经安装了docker,因为执行docker --version会生成以下输出:
Docker version 18.03.1-ce, build 9ee9f40
有人知道为什么sam找不到docker吗?
which docker
。它在哪里显示 Docker 已安装? - RyanWilcox