Cloning a Git Repo with Docker ENTRYPOINT for.a Flow Run

Some users don’t want to re-build the image each time there are changes to the Git repo. Instead, they want to just clone and install the Git repo during runtime. Here is one such example provided by a user in the community.


COPY /opt/prefect/


git init
git remote add origin<your_repo>.git
git fetch
git checkout -t origin/$GITHUB_REPO_BRANCH -f
[[ $REINSTALL_REQUIREMENTS -eq 1 ]] && pip install -r requirements.txt
[[ $REINSTALL_PY_PACKAGE -eq 1 ]] && pip install -e .
exec "$@" Added GITHUB_REPO_BRANCH environment variable to the ECS run.
ecs_run = ECSRun(
    //... other settings
    // Override these env variables to try different code