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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay