I'm currently debugging a Dockerfile and it would be really helpful if I could print things on the console during the build process.
To be specific: I have two different build-scripts depending on what branch is beeing build and I have to make the distinction inside the Dockerfile. As I understand it, I need to use Powershell syntax to put functionality into the Dockerfile, so I wrote the following:
ARG branch
RUN IF ($branch -eq 'alpha') {./alphabuild.bat}
RUN IF ($branch -eq 'rc') {./rcbuild.bat}
While the syntax finally seems to be correct (I never did Powershell scripting before), it still doesn't actually execute the build script when calling
docker build -t myapp:test --build-arg branch=alpha .
It would be really helpful to be able to print the result of the conditions, or the build argument itself to find out where the bug is.
Edit: Not a duplicate of this question, as I'm building a Windows container and I would really like to print stuff. Had several situations where that would come in handy.