I haven’t used Docker/docker-compose in a while, but it should be:
git checkout v2.7.1 # Jump to 2.7.1
docker-compose run --rm -e SKIP_POST_DEPLOYMENT_MIGRATIONS=true web rails db:migrate
docker-compose up -d # This should re-create the containers with latest code
docker-compose run --rm web rails db:migrate
docker-compose restart web sidekiq
That should be a pretty universal set of instructions for any release jump.