Skip to content

Instantly share code, notes, and snippets.

@laat
Last active October 14, 2015 10:53
Show Gist options
  • Save laat/2ed0b759e07868f0d918 to your computer and use it in GitHub Desktop.
Save laat/2ed0b759e07868f0d918 to your computer and use it in GitHub Desktop.
#!/bin/bash
containers=$(docker ps -q -a)
volumes=$(docker inspect -f '{{ $n := .Name }}{{ range $k,$v := .Volumes}} {{ if eq $k "/var/log" }} -v {{ $v }}:/var/log{{$n}}{{end}}{{end}}' ${containers})
exec docker run -d -v /etc/localtime:/etc/localtime:ro $volumes --name splunk -p 8000:8000 xeor/splunk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment