Suppress Docker swapiness warnings

docker

#1

Recently, build with Docker has starting giving output of WARNING: Your kernel does not support memory swappiness capabilities, memory swappiness discarded. which causes some of my testing with BATS to fail. It is difficult to simply redirect stderr because of the way BATS runs my Docker command under a helper function to grab the combined stderr and stdout.

It would be nice if we could suppress or log Docker related output that is separate from applications to another log file.


Docker gives kernel memory swappiness error without `--rm` flag
#2

Not sure how exactly could we do this, as Docker outputs everything in the same stream. Would it be an option to just cut that message out from the log file before you analyse it? Thanks.


#3

Yea, I don’t really care about the message. I’d rather have it cut from docker run output altogether so it isn’t prepended to my application output. Seems like a strange choice by Docker. I would expect stuff like this to go to the Docker daemon log file…


#4

A related issue is at Failing Tests using Dockers in CI. Still don’t have any workaround yet.


#5

It looks like Docker 1.9.1 changes where warnings are displayed. I see warnings under docker info now and not every docker run which is much better. My tests are passing again after using instructions from Docker 1.9.1 is available.


#6