I have a bitbucket repo that I connected to Docker Hub for automated build. I was wondering how to get the source files from the bitbucket repo into the docker build.
Do I still need to include an instruction in the Dockerfile for ADDing a folder, such as:
ADD python_model /home/condauser/tmp
Or should I use a git pull command to clone a repo into a directory in the docker image? I was not sure if this was automatically handled by the Docker Hub connection or not.
The automated builds basically make a checkout of your repository, and build the Dockerfile that's in the repository. All you need to do is make sure that the Dockerfile adds the files that are needed to it, using COPY
or ADD
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.