我正在尝试使用aws-sam-cli在项目根文件夹中使用以下命令来测试我的世界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
有谁知道为什么山姆无法找到 docker ?
最佳答案
跟着这些步骤:
~/.docker
目录Docker postinstall instructions中的更多信息