我正在尝试使用项目根文件夹中的以下命令使用aws-sam-cli测试我的 hello world lambda 函数:
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?