DEV Community

Lucien Boix
Lucien Boix

Posted on

1

Dockerfile : how-to output the result of a command when building an image

It can be useful to "see" the filesystem content at a building step, to make sure that previous steps have been really successful.

To list the content of the /user/bin/ folder for example you can add this instructions : RUN cd /usr/bin/ && echo $(ls)

After that you may need to run your docker build command with these extra flags to see an output : docker build --progress=plain --no-cache ...

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more