Skip to content

Instantly share code, notes, and snippets.

@czras
czras / docker_register_libvirt_hostname.sh
Created February 1, 2019 14:24
Register docker container hostnames in libvirt network.
#!/bin/sh
# adapted from https://gist.github.com/freshjones/b0713263033df8cc9f44
docker events --filter 'event=start' --filter 'event=die' | while read e
do
timestamp=`echo $e | cut -d " " -f 1`
object=`echo $e | cut -d " " -f 2`
event=`echo $e | cut -d " " -f 3`

Keybase proof

I hereby claim:

  • I am czras on github.
  • I am czras (https://keybase.io/czras) on keybase.
  • I have a public key ASB--qCPdDGbVKeJGdslr3BtrWNUHOaB3u22Dq6OXoodzQo

To claim this, I am signing this object: