Issues fixed:
- Remove --network=host (not allowed by daemon config)
- Remove --mount=type=cache from Dockerfile (compatibility)
- Simplify builder management and error handling
- Keep caches on build failure for faster retries
- Use standard Docker layer caching instead of BuildKit mount
This should resolve the 'granting entitlement network.host is not allowed' error.
Fixes:
- Fix missing indentation on line 127 (catch block)
- Fix stage indentation issues
- Remove automatic Buildx installation since it's pre-installed on server
Optimizations:
- Use existing Docker Buildx v0.25.0 installation
- Preserve buildx builder instance across builds for better performance
- Improved builder instance lifecycle management
- Better error handling and logging
The pipeline should now parse correctly and utilize the manually installed Buildx.
- Add Dockerfile.simple with single-stage build
- Uses system Maven instead of Maven Wrapper
- Simpler and more reliable for environments with wrapper issues
- Can be used as fallback if Buildx build fails
- Download maven-wrapper.jar from Maven Central Repository
- Update .gitignore to allow maven-wrapper.jar to be committed
- This fixes 'Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain' error
- Ensures Maven Wrapper works properly in CI/CD and Docker environments
- Enables builds without pre-installed Maven