nexdrew / rekcod

docker inspect :mag: โ†’ docker run :runner:
ISC License
371 stars 32 forks source link

Added arguments to support overriding image name, adding/replacing envs and bind mounts #31

Closed gservat closed 5 years ago

gservat commented 6 years ago

For our use case, we needed to be able to take the output from a docker inspect (or JSON or container ID) and replace the image with whatever we like. We also needed to be able to set extra environment variables and bind mounts, so I've added arguments to support these three things.

This is specific to our use case so feel free to discard this PR if you think these are not useful features to have in rekcod. Also, I haven't written JS in years so the code may be less than ideal ๐Ÿ˜„

Finally, I've removed a bunch of extra new lines that came in the output. Not sure if these are needed but I can't see why they would be.

nexdrew commented 6 years ago

@gservat Hi ๐Ÿ‘‹ I apologize for the long radio silence!

I think this is a really good idea, and it's something I'd like to support in rekcod, but as a former maintainer of yargs and the author of my own CLI library called sywac, I have Opinionsโ„ข about how this should be done. What I'd like to do is steal your great idea ๐Ÿ˜ƒ and come up with my own version of adding CLI flags to rekcod. I just don't know exactly when I'll get around to doing it.

Again, I apologize for letting this sit here so long without reply! Thank you for your ideas, interest, and efforts to improve rekcod!