nexdrew / rekcod

docker inspect :mag: → docker run :runner:
ISC License
371 stars 32 forks source link

Error: No such object: dockerinspect.json #38

Closed phillijw closed 5 years ago

phillijw commented 5 years ago

When I send inspect output to a json file and then use rekcod, I get empty output and then it complains about no such object.

This is using the docker installation with an alias.

phillijw@computer:~$ ls *.json
dockerinspect.json
phillijw@computer:~$ rekcod dockerinspect.json
[]

Error: No such object: dockerinspect.json

phillijw@computer:~$
nexdrew commented 5 years ago

I suspect this is because you'd have to mount pwd in order for the rekcod container to be able to read a file in the current working directory.

Try something like this instead:

$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/home nexdrew/rekcod /home/dockerinspect.json
phillijw commented 5 years ago

That fixes it, thanks

nexdrew commented 5 years ago

Cool, no problem, thanks for reporting!