I am currently running CTFd Flag server at home and I want to get the updates without having to rebuild and go through all that craziness again.
I just tested this recently and it worked flawlessly. I don’t even know how I found these commands, which is exactly why I am documenting this.
In my case, I cloned the repo and I maintain a local copy of that repo. To the best of my knowledge, this is what I did. I will update if this is incorrect
cd /opt/name-of-repo
sudo docker stop --time=30 container-id
- safely shut down the docker containers that running
sudo git fetch
sudo git reset --hard HEAD
sudo git merge '@{u}'
sudo git fetch --all --prune
I did another run of the pip install requirements. My containers are set to for ‘always’ to reboot in the docker-compose.yml file. (probably not necessary as I did not perform another docker-compose up -d command. It essentially just rebooted with the new version good to go.
sudo pip3 install -r requirements.txt
reboot