Fix CI Issues
Changes the build process to fix it and speed it up
- The gemfile lock hash is now used to ensure that the image matches the desired packages without having to always do a docker build
- Installing packages now happens with a parallelization level of 4
- Updated Docker/DinD to latest 24.0.2 version
- Updated from Ruby 2.7 to Ruby 3.1
- Fix settings not applying because they are not set globally.