Docker Scripts
David (the other author on this blog) and I have been doing a lot of work with docker with respect to our daily jobs. We ended up needed to orchestrate the management of multiple docker containers. This was before we discovered projects like maestro and maetro-ng. David found an awesome command line for parsing json called jq and put it to use by creating a bash one liner to grab a container’s IP address.
1 2 |
|
I took it one step further and created several more one liners to get other various pieces of information from containers.
1 2 |
|
1 2 |
|
The great news is that with jq
, you can create simple one liners for just about anything with the docker inspect
command and drop them in /usr/local/bin
and make your administrative life a little easier. I’m sure there are more useful ones, but those are the top 3 that David and I use that make things more simple.