Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples in readme do not work. #69

Open
skymoore opened this issue Apr 23, 2024 · 3 comments
Open

Examples in readme do not work. #69

skymoore opened this issue Apr 23, 2024 · 3 comments

Comments

@skymoore
Copy link

Why do none of the readme examples work?

docker run --rm -it --platform=linux/amd64 -v "$(pwd)":app/work threagile/threagile create-stub-model -output app/work
docker: Error response from daemon: invalid volume specification: '/host_mnt/Users/smoore/Develop/sre-services/threagile/docker:app/work': invalid mount config for type "bind": invalid mount path: 'app/work' mount path must be absolute.
See 'docker run --help'.

So I fix the path:

docker run --rm -it --platform=linux/amd64  -v "$(pwd)":/app/work threagile/threagile create-stub-model -output /app/work                                                                  1 ↵
2024/04/23 12:55:43 Unable to read/parse model yaml: open threagile.yaml: no such file or directory

So I add an example:

docker run --rm -it --platform linux/amd64 --shm-size=256m -v "$(pwd)/threagile.yaml":"/app/threagile.yaml"  threagile/threagile create-stub-model -output /app/work                     130 ↵
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories

The documentation needs to be accurate.

@wbirkmaier
Copy link

I am having the same problem too.

@cyber-person
Copy link
Contributor

@skymoore My guy what are you mounting?
docker run --rm -it --platform linux/amd64 --shm-size=256m -v "$(pwd)":/app/work threagile/threagile -verbose -model /app/work/threagile.yaml -output /app/work
This shoud do it for you. Make sure that the threagile.yaml file (which you already seem to have) is in you current working directory.

Still I agree, that the README is flawed.
As an introduction:

This command creates the example file
docker run --rm -it -v "$(pwd)":/app/work threagile/threagile -create-stub-model -output /app/work
rename it to threagile.yaml and run
docker run --rm -it -v "$(pwd)":/app/work threagile/threagile -verbose -model /app/work/threagile.yaml -output /app/work
You should get a .pdf.

@skymoore
Copy link
Author

@166268424 😂 bro I literally just copy pasted the example, expected that to work. Thank you for the response. I will try this out later today and report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants