Docker build commands no output displayed

652 Views Asked by At

my sh script is called by the ci-cd tool (BAMBOO). the sh script contains the docker build command. I am able to see the output in the ci-cd console which is its context example

RUN ls -ll

RUN pwd

However, in the docker file, if I do cat/ls/PWD and so forth. I am not able to see any output. It simply shows the sha256 hash on the screen. I tried adding --progress=plain / DOCKER_BUILDKIT=0. but still showing sha. I need to check the file content because there are other issues coming with the following command in this file which is commented for now.

Could anyone please guide me? I have attached a ci-cd console reference image.

ci-cd output

1

There are 1 best solutions below

0
On

Make sure, your ARG comes after the FROM.

See: https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact

As you can see here, variables won't be interpreted inside '', so use "" instead.