Docker Error - “jq: error: Cannot iterate over null”

前端 未结 4 1587
别跟我提以往
别跟我提以往 2020-12-15 16:47

So I\'m trying to deploy a dockerfile on Elastic Beanstalk, but I can\'t get past this error - \"jq: error: Cannot iterate over null\".

Successfully built [         


        
4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-15 17:06

    The problem is that your Dockerrun.aws.json file is missing the Volumes property.

    The 04pre.sh script uses the jq tool in order to query the JSON file.

    Specifically, it runs the following command on your file, which yields to an error:

    $ jq -c '.Volumes[] | [.HostDirectory, .ContainerDirectory]' < Dockerrun.aws.json
    jq: error: Cannot iterate over null
    

    Specifying an empty "Volumes" array should resolve the error.

提交回复
热议问题