我有这种情况,我想从天蓝色的bitbucket拉。 这个回购是私有的,所以我必须指定凭证。
所以我想尝试这样的事情:https://username:password@bitbucket.org/mycompany/myrep.git
有人知道或者这可能有用吗?或者我可能需要使用一些SSH构造?我使用Kudu ARM模板,您可以在其中指定存储库和分支,但到目前为止我没有找到指定凭据的方法。
答案 0 :(得分:0)
答案 1 :(得分:0)
此答案应该起作用: How to add credentials to Docker ADD command
应该像这样简单:
ARG bitbucket_pwd
ARG commit
ADD "https://user@domain.com:$bitbucket_pwd@bitbucket.org/teros/vana/raw/$commit/mw/requirements.txt" '/temp/requirements.txt'
您可以使用--build-arg
docker build --build-arg bitbucket_pwd="$bitbucket_password"