jpetazzo / syslogdocker

70 stars 18 forks source link

Syslog container dies #8

Open srasku opened 6 years ago

srasku commented 6 years ago

I modified Dockerfile to use "18.04" as a base instead of "14.04" since we use that as a base for all our other containers. When I run it, it exits immediately:

$ docker run --name syslog -v /tmp/syslogdev:/dev syslog --rm
container_linux.go:247: starting container process caused "no such file or directory"
docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "no such file or directory".
ERRO[0000] error getting events from daemon: net/http: request canceled 

It fails similarly for "14.04" as well.

sprive commented 5 years ago

@jpetazzo I too am using the un-modified Dockerfile from the blog post, same error:

$ docker run --name syslog -d -v /tmp/syslogdev:/dev syslog
b655d3dc74bdc2368f7118100e5497b3e2691bff8deb20b3e1710160d323f979
docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "setup user: no such file or directory": unknown.

I built the container using:

IMG_NAME="syslog"  docker build --tag $(IMG_NAME) --no-cache .

My env is Docker Desktop for osx, version:

$ docker --version
Docker version 18.09.1, build 4c52b90
sprive commented 5 years ago

more context: This approach potentially solves/works around a different issue with Docker for Mac and syslog "device" assumptions in code.

(Context, or that issue is: if you have code that can't be altered and it assumes a /dev/log device, then you need a way to mount a syslog "device" into the container... and apparently on Docker Mac, you can't mount the host's syslog device into the linux container... not on recent Docker Mac anyways)