How to prevent Dockerfile caching git clone

后端 未结 7 598
忘了有多久
忘了有多久 2020-11-30 08:19

I have a Dockerfile trying to package and deploy a web app to a container. The code of app fetches from git repository during Docker image building. Here\'s the Dockerfile s

7条回答
  •  天涯浪人
    2020-11-30 09:10

    For github private repos, you could also pass in your username and password:

    RUN git clone -b$BRANCH https://$USER:$PASSWORD@github.com/$USER/$REPO.git $GIT_HOME/

提交回复
热议问题