Bitbucket credentials in url
For bitbucket you can use credential caching
git config --global credential.helper 'cache --timeout 3600'
Follow this link
for more information .
This answer should work:How to add credentials to Docker ADD command
Should just be as simple as:
ARG bitbucket_pwdARG commitADD "https://user@domain.com:$bitbucket_pwd@bitbucket.org/teros/vana/raw/$commit/mw/requirements.txt" '/temp/requirements.txt'
you can pass the ARGs in using --build-arg
docker build --build-arg bitbucket_pwd="$bitbucket_password"