nexdrew / rekcod

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

Add possibility to process inspect json file content from stdin #13

Closed munkie closed 7 years ago

munkie commented 8 years ago

I had some troubles re running container that stopped on production And i did have permissions to install you lib on prod server Though i could get content of docker inspect command for stopped container My proposal to be able to process this file locally For emaple by rekcod < inspect.json command

nexdrew commented 8 years ago

@munkie Thanks for reporting!

This is similar to #7, but, if I understand you correctly, you want to be able to pipe the JSON output directly to rekcod instead of just a container name or id? I think I can implement it to support both.

It'll take a bit of refactoring, but I'll try to add this within the next week. Thanks again!

munkie commented 8 years ago

Andrew, correct. I want to pipe json directly.

On Sat, Oct 15, 2016, 8:04 PM Andrew Goode notifications@github.com wrote:

@munkie https://github.com/munkie Thanks for reporting!

This is similar to #7 https://github.com/nexdrew/rekcod/issues/7, but, if I understand you correctly, you want to be able to pipe the JSON output directly to rekcod instead of just a container name or id? I think I can implement it to support both.

It'll take a bit of refactoring, but I'll try to add this within the next week. Thanks again!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nexdrew/rekcod/issues/13#issuecomment-253983110, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGPmeV_o67P-q1L3SoCQs2gKYAPpUaPks5q0M9qgaJpZM4KXrYm .

munkie commented 8 years ago

@nexdrew By the way thanks for this tool. It helped me to restart docker container on production, while our deployment system was down :+1:

nexdrew commented 7 years ago

@munkie Finally made time to work on this, see PR #14. I published the branch to the next tag, feel free to give this a shot if you get a chance:

npm i -g rekcod@next

Then you can pipe JSON content, file names, or containers to rekcod:

$ cat docker-inspect.json | rekcod
$ rekcod docker-inspect.json
$ docker ps -aq | rekcod

Once I add more tests and update the docs, I'll publish 2.0.0 to latest.

Let me know what you think, and thanks for your valuable feedback!

nexdrew commented 7 years ago

@munkie This functionality has been released with version 2.0.0.

npm i -g rekcod@latest

This will allow you to save/copy the output of docker inspect remotely and then feed it to rekcod locally, so you don't need to install rekcod on your production servers.

Let me know what you think, and thanks for reporting!

munkie commented 7 years ago

Great work @nexdrew Thanks!