Hi,
Today I found an issue that the docker images don't clone the code from the bitbucket repository when is build from the bitbucket pipeline.
On my Dockerfile has a step to clone the code from bitbucket to docker images with this step below.
RUN sed -i 's/^# StrictHostKeyChecking ask/ StrictHostKeyChecking no/g' /etc/ssh/ssh_config && \
git clone git@bitbucket.org:project/example-repo.git /home/app && \
sed -i 's/^# StrictHostKeyChecking/# StrictHostKeyChecking/g' /etc/ssh/ssh_config
But after I tried to check inside the container that run with those docker images. The folder that should have a code is empty.
When I tried to build the docker images in my local laptop with the same docker file and the same command for docker build, the code from my repository is already pull to the application folder.
I tried to add a git debut to find out what is happening with `GIT_TRACE=true GIT_SSH_COMMAND="ssh -vvv"` options and I got whit this.
Block #1 Build the docker images with bitbucket pipeline. [Result : no code inside app]
debug2: channel 0: window 853335 sent adjust 8192
debug3: receive packet: type 98
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug3: receive packet: type 96
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug3: receive packet: type 97
debug2: channel 0: rcvd close
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
debug3: channel 0: will not send data after close
debug3: channel 0: will not send data after close
Block #2 Build the docker images in my laptop. [Result: code is already clone to app]
#18 32.43 debug2: channel 0: window 1966080 sent adjust 131072
#18 32.45 debug3: receive packet: type 98
#18 32.45 debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
#18 32.45 debug3: receive packet: type 96
#18 32.45 debug2: channel 0: rcvd eof
#18 32.45 debug2: channel 0: output open -> drain
#18 32.45 debug3: receive packet: type 97
#18 32.45 debug2: channel 0: rcvd close
#18 32.45 debug2: channel 0: close_read
#18 32.45 debug2: channel 0: input open -> closed
#18 32.45 debug3: channel 0: will not send data after close
#18 32.45 debug3: channel 0: will not send data after close
#18 32.45 debug2: channel 0: obuf empty
#18 32.45 debug2: channel 0: close_write
#18 32.45 debug2: channel 0: output drain -> closed
#18 32.45 debug2: channel 0: almost dead
#18 32.45 debug2: channel 0: gc: notify user
#18 32.45 debug2: channel 0: gc: user detached
#18 32.45 debug2: channel 0: send close
#18 32.45 debug3: send packet: type 97
#18 32.45 debug2: channel 0: is dead
#18 32.45 debug2: channel 0: garbage collecting
#18 32.45 debug1: channel 0: free: client-session, nchannels 1
#18 32.45 debug3: channel 0: status: The following connections are open:
#18 32.45 #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)
Could please help me.