如何使用AWS Serverless运行Docker

时间:2018-11-27 14:20:00

标签: docker aws-lambda virtualbox serverless aws-serverless

我正在尝试部署无服务器功能,但是我遇到了一些docker问题。我正在Windows 10上工作并已安装docker。我使用以下命令创建了一个虚拟机:

docker-machine env virtualbox

运行无服务器部署时,出现错误:

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.39/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon conf                                                                 iguration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

然后我尝试运行命令:

  eval "$(docker-machine env virtualbox)"

我取得了一些进展,但是最终出现了一个错误:

$ serverless deploy
Serverless: Generated requirements from 
C:\Users\Desktop\folder\requirements.txt 
in C:\Users\Desktop\folder                                                                
QL\.serverless\requirements.txt...
Serverless: Installing requirements from 

C:\Users\Desktop\folder\.serverless\requirements\requirements.txt ...
Serverless: Docker Image: lambci/lambda:build-python3.6

Error --------------------------------------------------

docker: Error response from daemon: create 
"/c/Users/folder/.serverless/requirements": 
"\"/c/Users/Desktop/folder/.serverless/requirements\"" includes invalid characters 
for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you 
intended to pass a host directory, use absolute path.                                                            
See 'docker run --help'.

任何帮助将不胜感激!

0 个答案:

没有答案