Docker Community Forums

Share and learn in the Docker community.

A lot of empty newlines in Std.IN


#1

Hello,

It seems docker sends a lot of empty lines on StdIn of an app.

I implemented a simple app that reads from StdIn. The main part looks like:

while (StdIn.readLine() == null) {
i += 1
println(i)
}

Then I archived it, copy to docker, unzip and run via entrypoint
ENTRYPOINT ["/opt/mn/docker_newline/bin/docker_newline"]

You can find repository here: https://github.com/max-neverov/docker_newline.
I’ve added already built archive for those who don’t have installed sbt.
Use docker-compose up --build to run it.

When you run it in docker it prints a lot of numbers to output.
If i use the same zip file unarchived locally on my machine and run the app - it prints nothing.

So my question is: what’s the machinery behind running apps with ENTRYPOINT? Why it sends signals?