Closed jpetazzo closed 10 years ago
I think I can do this, at least I have an idea of how it could be done.
That would be awesome!
I have tested the following the following modification and it seems to work fine. I am a bit short of time, so if someone would like it, please modify your local copy (or submit a proper update via git).
The line that says:
GUESTNAME=$2
should be replaced by:
GUESTNAME=$(docker inspect -format='{{.ID}}' $2)
The proper solution should also support non-docker users, so a bit more coulding would be required. Something like this might work:
GUESTNAME=$2
[ "which docker
" ] && {
GUESTNAME=$(docker inspect -format='{{.ID}}' $2)
}
/Lars
I've just been doing it like this:
pipework $BRIDGE $(docker ps | grep $GUESTNAME | awk '{print $1}') $IP_CIDR
I would prefer using docker inspect
, instead of the depencency on grep
, awk
and docker ps
output formatting.
I've only tested minimally, but it looks like this should work :-)
:)
To address a suggestion in #16.