duo-labs / duo-labs/cloudmapper

file location changes to support clean docker volume mounting

Open
#814 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6.3k
Forks
836
PR merge metrics
No merged PRs in 30d

Description

-This affects any command involving the web/ directory as output, eg report, iam_report
- Relates to working in docker

When running in Docker, it is desirable to mount volumes so the data persists when the run is over.
```
docker run -v $PWD/account-data:/opt/cloudmapper/account-data cloudmapper:latest collect --account $account --profile $profile
```

This works fine because the only contents in cloudmapper/account-data is sample data. It's fine to clobber it and everything works great. However, `report` and `iam_report` create files in web/account-data/
which already contains map.html. So it is not possible to add `-v $PWD/web/account-data:/opt/cloudmapper/web/account-data` to persist the reports because it would clobber the map.html file.
As a workaround, every user would have to write scripts to copy in map.html, move it into place after clobbering, or move report.html into cloudmapper/account-data after creation. This is messy.

The fix would be to place map.html in another location, like web/map.html and then fix all the references to it.
I can create a PR if this solution is acceptable.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.