First, build the image:
docker build -rm -t logstash.ZGJFs18d .
Ensure all your stdin is passed to the process in the container:
seq 1 10 | docker run -rm -i logstash.ZGJFs18d wc -l
Expected output: 10
Ensure you can run seq 1 10 through logstash-noconfig
:
docker run -rm -i logstash.ZGJFs18d seqtest
The script simply runs Logstash 1.3.3 without a configuration:
java -jar logstash-1.3.3-flatjar.jar agent -e ''
Expected output:
{
"message" => "1",
"@version" => "1",
"@timestamp" => "2014-02-20T05:00:53.699Z",
"type" => "stdin",
"host" => "1ebabc819b6f"
}
...
{
"message" => "10",
"@version" => "1",
"@timestamp" => "2014-02-20T05:00:53.704Z",
"type" => "stdin",
"host" => "1ebabc819b6f"
}
Now, try running seq
outside the container:
seq 1 10 | docker run -rm -i logstash.ZGJFs18d logstash-noconfig
That works fine on a native Docker with a domain socket, but not if you're
on OS X talking to the boot2docker image via DOCKER_HOST=tcp://
.
docker version
:
Client version: 0.8.0
Go version (client): go1.2
Git commit (client): cc3a8c8
Server version: 0.8.0
Git commit (server): cc3a8c8
Go version (server): go1.2
docker info
:
Containers: 17
Images: 86
Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Dirs: 150
Debug mode (server): true
Debug mode (client): false
Fds: 15
Goroutines: 43
Execution Driver: lxc-0.8.0
EventsListeners: 71
Kernel Version: 3.12.1-tinycore64
Init Path: /usr/local/bin/docker
depressingly, it works for me on boot2docker 0.5.4 running on bare hardware