Adding Dockerfile and docker documentation #26
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #22
Thanks for the opportunity to work on this!
Operating System
Docker-CE versioning
Dockerfile contents (for reference)
Build command
Sample Execution
Equivalent of running this with no arguments
Running with
--help
Running against named targets
This provides some interesting solutions which are difficult to demonstrate in my lab, but you could essentially run some ad-hoc container introspection using this utility by wrapping your
docker run
function in some logic allowing you to specify any of your container networks and targets.Most of my testing was done on
docker0
with a flat network but the application should be the same in other network structures. The key thing is remembering what networking looks like in your container which can be abstracted enough such that using this utility might be confusing at first glance.If you wanted to run this on a workstation that had docker running, you could attach the container to your host network. You wouldn't be able to use NAT networking in that case, I imagine, as what the container sees is limited to the private network that only docker0 knows.
At any rate, a majority of this contribution is the Dockerfile which can be used to build a local image or one on Docker Hub under your ownership if that's your goal. I've updated the documentation to include usage examples