Closed ozbillwang closed 4 years ago
This issue does not appear to be related to Docker.
@0xdabbad00
It does.
Use the same image I build with exist Dockerfile, but I mount the repo to container (-v $(pwd):/opt/cloudmapper
), it works.
Could you try it on your computer? this problem is easily duplicated
$ git clone git@github.com:duo-labs/cloudmapper.git
$ cd cloudmapper
$ docker build -t cloudmapper .
# doesn't work, that's the issue I reported here.
$ docker run -ti --rm cloudmapper bash
root@3095bc277b04:/opt/cloudmapper# python cloudmapper.py prepare --config config.json.demo --account demo
....
....
_pyjq.ScriptRuntimeError: Cannot iterate over null (null)
# does work
$ docker run -ti --rm -v $(pwd):/opt/cloudmapper cloudmapper bash
root@fab09cf1fd9b:/opt/cloudmapper# python cloudmapper.py prepare --config config.json.demo --account demo
Building data for account demo (123456789012)
- 16 nodes built in region us-east-1
- 3 external CIDRs built
- 35 connections built
root@fab09cf1fd9b:/opt/cloudmapper#
This issue does not appear to be related to Docker.
@0xdabbad00 I'm seeing exactly this same problem. What do you think is the problem?
This issue does not appear to be related to Docker.
@0xdabbad00 I'm seeing exactly this same problem. What do you think is the problem?
I figured out the problem; I was missing the account-data/demo
because .dockerignore
prevented the account-data
from getting added to the docker image(a good thing).
To run the demo using docker, you must bind mount the account-data
directory, e.g.
docker run --rm -it -p 8000:8000 -v `pwd`/account-data:/opt/cloudmapper/account-data cloudmapper /bin/bash