Docker Community Forums

Share and learn in the Docker community.

Is it possible to make failing RUN command's output visible with docker build?


(Raatikka) #1

In Dockerfile there is :

RUN [cmd]

When [cmd] fails it normally prints output to stderr and to log but since the Dockerfile is processed by

docker build command the output is suppressed and the log is lost with the container’s context.

Is it possible to make failing command’s output visible with docker build?


(John Gasper) #2

I’d try changing the RUN line to:

RUN [cmd]; cat [logfile]


(Raatikka) #3

That helps. Thanks!

Regards

Vilho